Page 1 of 2

SAP CCMS plugin

Posted: Mon Aug 18, 2014 3:09 pm
by cwireless
Hi,
We have this configuration:
CentOS release 5.4 (Final); 32 bit; Nagios XI 2014R1.3; No special configurations.Using Google Chrome.

We have already installed several plugins in our NAgios XI box, and based on our experience we have followed
the NRPE-Troubleshooting-and-Common-Solutions.pdf guide.

We want to monitor a SAP system using SAP CCMS plugin;
http://exchange.nagios.org/directory/Pl ... ns/details

We already compiled and from our nagios box it runs fine.
But when we try to configure in Nagios GUI the command we are getting (Return code of 127 is out of bounds - plugin may be missing)

The SAP CCMS plugin was installed directly in NAgios, and as mentioned; when you run from nagios command line you get
this output:

Code: Select all

[nagios@nagioscwp libexec]$ ./check_sap 0 SRG
Freespace=138751MB | Freespace=138751MB;50.000000;25.000000;0;
[nagios@nagioscwp libexec]$ ./check_sap 100 SRG
ResponseTime=360msec | ResponseTime=360msec;3000.000000;5000.000000;0;
[nagios@nagioscwp libexec]$ pwd
/usr/local/nagios/libexec
[nagios@nagioscwp libexec]$ ls -lrt check_sap
-rwxr-xr-x 1 nagios users 9836 Aug 15 14:56 check_sap
[nagios@nagioscwp libexec]$ more /etc/redhat-release
CentOS release 5.4 (Final)
[nagios@nagioscwp libexec]$ uname -a
Linux nagioscwp 2.6.18-164.9.1.el5 #1 SMP Tue Dec 15 21:04:57 EST 2009 i686 i686 i386 GNU/Linux
[nagios@nagioscwp libexec]$
When you test from Nagios GUI this is the output

Code: Select all

Testing check from command line...

COMMAND: /usr/local/nagios/libexec/check_sap 0 SRG
OUTPUT: 
So, this plugin has permissions, belongs to nagios, it is not executed by nrpe and the spelling is fine.
Where else should we look for more clues?

Re: SAP CCMS plugin

Posted: Mon Aug 18, 2014 3:53 pm
by slansing
Have you tried configuring that command on a service in XI and checking the actual Home > Services > (service name) page of that service? It is entirely possible that the command you are trying to check via the CCM will not be accepted, this is a common issue with commands that include characters which are not able to be passed through as the command is actually executed by apache at that point. Many times, the command/check will still work fine after you have configured it on a host/service.

Re: SAP CCMS plugin

Posted: Mon Aug 18, 2014 4:41 pm
by cwireless
Hi slansing,

You mean something like this in the attachment.

Thanks for your response.

Re: SAP CCMS plugin

Posted: Mon Aug 18, 2014 4:51 pm
by abrist
NO actually. If the plugin cannto be run by the "apache" user, it will not work in the "test check command" function of the CCM. You need to fully configure the check and then see what XI reports on the Home --> Service Detail page.

Re: SAP CCMS plugin

Posted: Tue Aug 19, 2014 8:10 am
by cwireless
Thanks abrist,

The service was configured and the message is:
(Return code of 127 is out of bounds - plugin may be missing)

Re: SAP CCMS plugin

Posted: Tue Aug 19, 2014 1:34 pm
by cwireless
I have been troubleshooting this around, but I could not find a way to solve it. I removed the configurations for command and service; without success.

The weird thing here is that it runs fine from command line in nagios server(where the plugin was installed); but the error messages is displayed when you try to run from NagiosXI GUI configuration.

Any idea please?

Re: SAP CCMS plugin

Posted: Tue Aug 19, 2014 4:40 pm
by slansing
Hmmm can we get a :

Code: Select all

ll /usr/local/nagios/libexec/check_sap
Thanks!

Re: SAP CCMS plugin

Posted: Wed Aug 20, 2014 8:02 am
by cwireless
slansing wrote:Hmmm can we get a :

Code: Select all

ll /usr/local/nagios/libexec/check_sap
Thanks!
Info requested.

Code: Select all

[nagios@nagioscwp libexec]$ ll /usr/local/nagios/libexec/check_sap
-rwxr-xr-x 1 nagios users 9836 Aug 15 14:56 /usr/local/nagios/libexec/check_sap
[nagios@nagioscwp libexec]$

Re: SAP CCMS plugin

Posted: Wed Aug 20, 2014 5:18 pm
by slansing
Lets give this a shot, we're going to add the nagios group in there:

Code: Select all

chown nagios:nagios /usr/local/nagios/libexec/check_sap
Then take a look at the web interface, either schedule an immediate check, or wait for the next one to occur.

Re: SAP CCMS plugin

Posted: Fri Aug 22, 2014 8:17 am
by cwireless
NO luck. I changed owner to nagios and below you can see the same message.
chownnagios.GIF
outofbounds.GIF