Page 4 of 6
Re: Check Script not able to run
Posted: Thu May 26, 2016 11:01 am
by tgriep
You can search our exchange site for another plugin if you like.
https://exchange.nagios.org/
Now we narrowed it down to the one check that is failing.
It could be a permission problem with the plugin so try adding this line to the /etc/sudoers file and then see if the check can run from the Nagios server.
Code: Select all
nrpe ALL=(ALL) NOPASSWD: /etc/nagios/nrpe.d/check_mem
If it doesn't then check the /var/log/messages log file on the remote server to see if there are any errors that can help to troubleshoot this issue.
Re: Check Script not able to run
Posted: Thu May 26, 2016 8:09 pm
by cyberportnoc
Dear tgriep,
Any service need to restart after change?
Please advise.
Re: Check Script not able to run
Posted: Thu May 26, 2016 8:26 pm
by cyberportnoc
Dear tgriep,
Please advise which plugin is able memory check exclude cached memory.
Thanks,
Kelvin
Re: Check Script not able to run
Posted: Thu May 26, 2016 8:39 pm
by Box293
What is the output of this:
Code: Select all
su -s /bin/sh nrpe
/etc/nagios/nrpe.d/check_mem -uC -w 70 -c 90
Re: Check Script not able to run
Posted: Thu May 26, 2016 9:07 pm
by cyberportnoc
Dear Box,
[root@rhel64-02 ~]# su -s /bin/sh nrpe
sh-4.1$ /etc/nagios/nrpe.d/check_mem -uC -w 70 -c 90
OK - 5.5% (5451496 kB) used.|TOTAL=99005228KB;;;; USED=5451496KB;69303659;89104705;; FREE=93553732KB;;;; CACHES=93212520KB;;;;
Thanks,
Kelvin
Re: Check Script not able to run
Posted: Thu May 26, 2016 9:09 pm
by cyberportnoc
Dear sir,
Even i added to /etc/sudoers
The result is same, and i cannot get any error information in /var/log/message
Thanks,
Kelvin
Re: Check Script not able to run
Posted: Thu May 26, 2016 10:03 pm
by Box293
Where did you download the plugin from, do you have a link?
Or upload it here please.
Re: Check Script not able to run
Posted: Thu May 26, 2016 10:18 pm
by cyberportnoc
HI,
File attached.
Thanks,
Kelvin
Re: Check Script not able to run
Posted: Mon May 30, 2016 5:26 am
by cyberportnoc
HI,
Any update?
Thanks,
Kelvin
Re: Check Script not able to run
Posted: Mon May 30, 2016 11:07 pm
by Box293
I've tested the plugin and it works fine.
Can you confirm that in your nrpe.cfg file, the command[nagios_memory] is pointing to the correct location of the plugin (/etc/nagios/nrpe.d/check_mem).
If it is correct then nrpe/xinetd must not have been restarted or there is duplicates running.
At this point, restart the entire server and test again.
If it still does not run after this, then we need to turn on NRPE debugging to collect more information.
Edit the file:
/usr/local/nagios/etc/nrpe.cfg
Define
debug=1
(it will currently be debug=0)
Save the file and
service xinetd restart
Now we need to add an option to the rsyslog server so it processes debug messages
Edit the file:
/etc/rsyslogd.conf
Find /var/log/messages
The line in the config file will look like:
*.info;mail.none;authpriv.none;cron.none /var/log/messages
We need to add the following to the line:
*.info;mail.none;authpriv.none;cron.none;daemon.debug /var/log/messages
Save the file and
service rsyslog restart
No test executing the plugin via check_nrpe
Now there should be more information logged in /var/log/messages
Please post what is logged.