HELP: HowTo Use nagios-ccms-plugin executables

Hans Harder hans at atbas.org
Fri Oct 26 20:14:22 MET DST 2007


Hi Axel,

With 7.xx you now always have a sapstart service running (windows and 
unix) for each instance which supplies a soapservice for 
stopping/starting the instance, but also getting information or 
executing os commands.
Probally this has been made to enable SAP ACC (adaptive computing 
controller) to remotely control the instances.

One of the features is to get the alert tree from the sap instance.
This can be the full ccms tree or only the elements which are in alert 
state.

In the sap kernel directory you can find a 'sapcontrol' executable.
This is a cmdline version which can be used in scripting and connects 
internally to the soap service and does not require authentication (with 
correct user)
It just needs some simple parameters for getting the current status or 
getting the ccms tree. also different kind of output is supported.

for instance:
sapcontrol -format script -nr <instanceno> function GetAlertTree
....
will get you the complete CCMS tree  (ABAP or J2EE)

some other functions:
GetAlerts, GetVersionInfo, GetQueuStatistic,GetProcessList,
AnalyseLogFiles, OSexecute,ABAPReadSysLog,ABAPGetWPTable,
J2EEGetProcessList, J2EEGetThreadList, etc.

Just some simple parsing and you can do anything with it.

I think in 7.1 or newer the sapstart service is replaced by a single 
host version. Also which each kernel release new functions are added.

Some examples:

sapcontrol -nr 30 -function GetProcessList
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
jcontrol, J2EE Server, GREEN, All processes running, 2007 09 01 
01:15:49, 57:10:06, 3805
igswd_mt,            , GREEN, Running,               2007 09 01 
01:15:49, 57:10:06, 3806

sapcontrol -nr 30 -function J2EEGetProcessList
telnetPort, name, pid, type, restart, exitCode, state, startTime, 
elapsedTime, restartCount, errorCount, cpu, debug
0,     SDM,        4945, SDM Server,      Yes, , J2EE_RUNNING, Running, 
2007 09 01 01:16:04, 57:10:31, 0, 0, 0:01:00, Switched off
53008, dispatcher, 4943, J2EE Dispatcher, Yes, , J2EE_RUNNING, Running, 
2007 09 01 01:16:04, 57:10:31, 0, 0, 0:05:43, Disabled
0,     server0,    4944, J2EE Server,     Yes, , J2EE_RUNNING, Running, 
2007 09 01 01:16:04, 57:10:31, 0, 0, 0:12:02, Disabled

sapcontrol -format script -nr 30 -function GetAlertTree |sapc_parse -g 
"Memory" -b GREEN -e RED check
GREEN 
\CPP_30_Disp_308726100_nlcoccpp\Services\Memory_Info\AllocatedMemory 161 MB
GREEN 
\CPP_30_Disp_308726100_nlcoccpp\Services\Memory_Info\AvailableMemory 170 MB
GREEN    \CPP_30_Disp_308726100_nlcoccpp\Services\Memory_Info\UsedMemory 
30 MB
GREEN    HYPERLINK 
"file://\\Memory\AllocatedMemory"\\Memory\AllocatedMemory 2005 MB
GREEN    HYPERLINK 
"file://\\Memory\AvailableMemory"\\Memory\AvailableMemory 2048 MB
GREEN    HYPERLINK "file://\\Memory\UsedMemory"\\Memory\UsedMemory 364 MB

sapc_parse is a little tool I made which parses the output of sapcontrol

Hope this helps

Hans



Axel Eble wrote:
 > On 10/26/07, Hans Harder <hans at atbas.org> wrote:
 > [...]
 >> if you have sap 7.xx you can also get the CCMS tree (even j2ee) by using
 >> sapcontrol (sap kernel executable) or using a soap request.
 >
 > Can you elaborate on that? I'd very interested in that as well, as the
 > CCMS plugins are, as you say, not easy to maintain.
 >
 >> Hans
 > [...]
 >
 > Kind regards,
 > Axel
 >


Axel Eble wrote:
> On 10/26/07, Hans Harder <hans at atbas.org> wrote:
> [...]
>> if you have sap 7.xx you can also get the CCMS tree (even j2ee) by using
>> sapcontrol (sap kernel executable) or using a soap request.
> 
> Can you elaborate on that? I'd very interested in that as well, as the
> CCMS plugins are, as you say, not easy to maintain.
> 
>> Hans
> [...]
> 
> Kind regards,
> Axel
> 


More information about the linux.general mailing list