Check Script not able to run

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check Script not able to run

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
cyberportnoc
Posts: 66
Joined: Tue Nov 24, 2015 1:14 am

Re: Check Script not able to run

Post by cyberportnoc »

Dear tgriep,

Any service need to restart after change?

Please advise.
cyberportnoc
Posts: 66
Joined: Tue Nov 24, 2015 1:14 am

Re: Check Script not able to run

Post by cyberportnoc »

Dear tgriep,

Please advise which plugin is able memory check exclude cached memory.

Thanks,
Kelvin
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Check Script not able to run

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cyberportnoc
Posts: 66
Joined: Tue Nov 24, 2015 1:14 am

Re: Check Script not able to run

Post 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
cyberportnoc
Posts: 66
Joined: Tue Nov 24, 2015 1:14 am

Re: Check Script not able to run

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Check Script not able to run

Post by Box293 »

Where did you download the plugin from, do you have a link?

Or upload it here please.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cyberportnoc
Posts: 66
Joined: Tue Nov 24, 2015 1:14 am

Re: Check Script not able to run

Post by cyberportnoc »

HI,

File attached.

Thanks,
Kelvin
You do not have the required permissions to view the files attached to this post.
cyberportnoc
Posts: 66
Joined: Tue Nov 24, 2015 1:14 am

Re: Check Script not able to run

Post by cyberportnoc »

HI,

Any update?

Thanks,
Kelvin
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Check Script not able to run

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked