Page 1 of 1

NRPE Checks of local Nagios server?

Posted: Fri Jul 12, 2024 9:39 am
by gregbeyer
Can I use the same nrpe checks that I run against remote hosts, against my local nagios server, too? Need to watch the same things on my server that I do on my remote hosts. Or, as nrpe is mean for remote monitoring, do I need to create a suite of local checks, not using nrpe, just for the server? Thanks.

Re: NRPE Checks of local Nagios server?

Posted: Fri Jul 12, 2024 11:48 am
by jmichaelson
We do install NRPE along with Nagois XI. I don't see a reason at all why it wouldn't work. Give it a try and let us know!

Re: NRPE Checks of local Nagios server?

Posted: Fri Jul 12, 2024 3:14 pm
by gregbeyer
Yeah, thought so too. I am already running nrpe locally, but getting failures on local checks. But on thousands of other remote hosts, same checks, it works fine. That's why I wondered if perhaps my problem is that nrpe can't be used locally. It's sort of a sanity check question. So, there's something else going on with nrpe on my server, apparently. Not seeing errors for nrpe in /var/log/messages. I'll keep looking, since it should work just fine.
nrpe_server.png
Correction -- just had some interesting errors pop in messages:

Jul 12 16:15:37 nagios check_nrpe: Remote 128.61.254.53 does not support version 3/4 packets
Jul 12 16:15:37 nagios check_nrpe: Remote 128.61.254.53 does not support version 3/4 packets

And that IP address is my server's. :?

Re: NRPE Checks of local Nagios server?

Posted: Sat Jul 13, 2024 11:34 pm
by kg2857
You need to define the undefined check_disk_var command and add -2 (I think) to the check_nrpe command to start.

Re: NRPE Checks of local Nagios server?

Posted: Mon Jul 15, 2024 9:01 am
by gregbeyer
Hi, can you clarify what you mean define check_disk_var? It is working for many other nodes, so it must, I think, be defined already. It's just not working on the one nagios server host. Thanks.

Re: NRPE Checks of local Nagios server?

Posted: Mon Jul 15, 2024 10:00 am
by swolf
gregbeyer wrote: Mon Jul 15, 2024 9:01 am Hi, can you clarify what you mean define check_disk_var? It is working for many other nodes, so it must, I think, be defined already. It's just not working on the one nagios server host. Thanks.
Depending on how the NRPE agent gets installed on other servers, you might have a different configuration on your local XI server. I would check /usr/local/nagios/etc/nrpe.cfg on both servers - look for lines near the bottom of the config file like the following:

Code: Select all

 
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200

Re: NRPE Checks of local Nagios server?

Posted: Mon Aug 12, 2024 2:52 am
by Andreaa23
kg2857 wrote: Sat Jul 13, 2024 11:34 pm You need to define the undefined check_disk_var command and add -2 (I think) to the check_nrpe command to start.
Thanks, I will try again with this