Check_Load displays load even if monitored node is off

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Insep
Posts: 9
Joined: Thu Jan 12, 2017 8:18 am

Re: Check_Load displays load even if monitored node is off

Post by Insep »

Thanks for your help :D
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_Load displays load even if monitored node is off

Post by rkennedy »

Are we good to mark this thread resolved?
Former Nagios Employee
Insep
Posts: 9
Joined: Thu Jan 12, 2017 8:18 am

Re: Check_Load displays load even if monitored node is off

Post by Insep »

One more Question ;)

I tested smnp, but now tried to get nrpe running, because the way smnp is configured is not ideal for me.

However i got it that far, that i get results from an request.

Code: Select all

pi@raspberrypi:/usr/lib/nagios/plugins $ ./check_nrpe -H 10.10.133.120 -c check_load
OK - load average: 0.19, 0.29, 0.34|load1=0.190;15.000;30.000;0; load5=0.290;10.000;25.000;0; load15=0.340;5.000;20.000;0;
Now I want to test a Plugin for monitoring Memory (check_mem).
It´s working on the monitored Machine if I test it locally:

Code: Select all

d78a@ei-rn-lab12 /usr/local/nagios/libexec $ ./check_mem -u -w 10 -c 50
CRITICAL - 90.4% (1852256 kB) used!|TOTAL=2048836KB;;;; USED=1852256KB;204883;1024418;; FREE=196580KB;;;; CACHES=998268KB;;;;
But However it doesnt work when I try to get the data from the Server:

Code: Select all

pi@raspberrypi:/usr/lib/nagios/plugins $ ./check_nrpe -H 10.10.133.120 -c check_mem
NRPE: Command 'check_mem' not defined
I already added the command to the "/usr/local/nagios/etc/nrpe.cfg" at the host and installed the plugin on the host and server.

Code: Select all

command[check_mem]=/usr/local/nagios/libexec/check_mem -w 70 -c 90
What could I have made wrong, that the new Plugin works locally but not over the Network?

Additionaly the results I get - when I set the Service description - in Nagios is only the Version Number of NRPE, but not the requested Information.
When i try to define a command in the command.cfg for nrpe, it tells me that there is already a definition for that, but I have no idea, where this should supposed to be.

Code: Select all

define service{
        use                     generic-service
        host_name               pcneben
        service_description     CPU Load NRPE
        check_command           check_nrpe!check_load
}

define service{
        use                     generic-service
        host_name               pcneben
        service_description     RAM Usage NRPE
        check_command           check_nrpe!check_mem
}
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_Load displays load even if monitored node is off

Post by rkennedy »

After adding the command for check_mem, did you restart the NRPE or xinetd service (depending on how it's running)? You'll need to do this for it to take affect.
Additionaly the results I get - when I set the Service description - in Nagios is only the Version Number of NRPE, but not the requested Information.
When i try to define a command in the command.cfg for nrpe, it tells me that there is already a definition for that, but I have no idea, where this should supposed to be.
My guess is it's defined already, but missing $ARG$ variables. What is the output of this command?

Code: Select all

grep '' /usr/local/nagios/etc/*
Former Nagios Employee
Insep
Posts: 9
Joined: Thu Jan 12, 2017 8:18 am

Re: Check_Load displays load even if monitored node is off

Post by Insep »

I restarted the Host and the definition I had done for check_mem was gone.
So added it again, restarted Nrpe and xinetd and it finally worked.

I added a new command definition nrpe1, so I have no duplicate Versions of the definition. That solved the Problem!

Thanks for your help Rkennedy, you can close the Thread!
#muchlove :mrgreen:
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_Load displays load even if monitored node is off

Post by rkennedy »

No problem - it's what we're here for! Feel free to create a new post in the future if you have further questions.

Locking this one up - have a great weekend!
Former Nagios Employee
Locked