Hi
I've been trying to build an alert monitor in PHP that gets data from the CCMS. I'm new to SAP but not to PHP.
The saprfc works just fine and I'm able to test function modules with the saprfc_test.php. I've seen the tutorial on how to get alert data (CPU utilization) from the CCMS. And it works fine. So what's the problem you ask?
If anyone here have tried the SAP CCMS plugin for Nagios they know that all you need (almost all you need) is to provide the long name of the MTE e.g SID\system_SID_01\R3Services\Background\AbortedJobs and you get the alert message that you see in RZ20.
I've found several function modules that gives me the value of a monitor leaf node, but only the ones with a number as a value (percent CPU usage, MB disk space left +++). If I try to get data from e.g AbortedJobs i get nothing.
I've found one function module that gives me the data that e.g AbortedJobs shows (SALR_MTE_STAT_MSG_READ_CUR_VAL) but this one won't of course show leaf nodes with numbers...
The nagios plugin uses:
BAPI_SYSTEM_MON_GETTREE
BAPI_SYSTEM_MTE_GETMLCURVAL
BAPI_SYSTEM_MTE_GETPERFCURVAL
BAPI_SYSTEM_MTE_GETSMVALUE and
BAPI_SYSTEM_MTE_GETTXTPROP
I'm having trouble trying any of these in my test application. The return array is:
Array
(
[TYPE] => E
[ID] => RA
[NUMBER] => 346
[MESSAGE] => Problems accessing database (function 'BAPI_SYSTEM_MTE_GETMLCURVAL')
[LOG_NO] =>
[LOG_MSG_NO] => 0
[MESSAGE_V1] => BAPI_SYSTEM_MTE_GETMLCURVAL
[MESSAGE_V2] =>
[MESSAGE_V3] =>
[MESSAGE_V4] =>
[PARAMETER] =>
[ROW] => 0
[FIELD] =>
[SYSTEM] =>
)
Someone have to have tried to build a custom CCMS monitor of some sort?
My idea is that the leaf nodes I want to pull from the CCMS is defined in an XML file:
<SYSTEM>SolMan</SYSTEM> <MONITOR>Aborted Jobs</MONITOR> <MEASUREMENT>-</MEASUREMENT> <MTSYSID>SID</MTSYSID> <MTMCNAME>system_SID_01</MTMCNAME> <MTNUMRANGE>032</MTNUMRANGE> <MTUID>0000000003</MTUID> <MTCLASS>102</MTCLASS> <MTINDEX>0000002308</MTINDEX> <EXTINDEX>0000000050</EXTINDEX>
and then I can list them as I want on the screen.
I really hope someone can come with some pointers and shed some light on this. It would be much appreciated.