how to verify if linux nrpe agent is running?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

how to verify if linux nrpe agent is running?

Post by ikekim »

How do I verify if the Linux NRPE agent is running on the Centos 7.x machine that is being monitored?

And how do I modify the "allow" IP address for the NagiosXI Server because I have installed NagiosXI on a different server?


thanks,
ik.
dwasswa

Re: how to verify if linux nrpe agent is running?

Post by dwasswa »

Hi @ikekim,

To check if NRPE is running , run the command

Code: Select all

service nrpe status
And to modify allow IP on the nagios xi server you will have to go to nrpe configuration file
cd
like so..

Code: Select all

/usr/local/nagios/etc/nrpe.cfg
Look for this line

Code: Select all

allowed_hosts=127.0.0.1
and then add your IP like so...

Code: Select all

allowed_hosts=127.0.0.1,<IP address>
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: how to verify if linux nrpe agent is running?

Post by ikekim »

Hi dwasswa ,

the command doesn't tell me if the service is running.

[root@centos-min2 ~]# service nrpe status
Redirecting to /bin/systemctl status nrpe.service
Unit nrpe.service could not be found.

I also looked at the /usr/local/nagios/etc/nrpe.cfg , but interestingly, I don't see the original INagios XI P address which the install script prompted for me to eneter.


thank,
ik
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: how to verify if linux nrpe agent is running?

Post by lmiltchev »

Most probably NRPE is running under xinetd. You can view the nrpe config by running:

Code: Select all

cat /etc/xinetd.d/nrpe
Try:

Code: Select all

service xinetd status
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
Be sure to check out our Knowledgebase for helpful articles and solutions!
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: how to verify if linux nrpe agent is running?

Post by ikekim »

I tried:

Code: Select all

cat /etc/xinetd.d/nrpe
and it returned:
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 49.27.73.92
}

So in following your instructions I have to modify the line "only_from = new ip address"?

If yes, can I add multiple IP addresses in case I'm using more than one Nagios XI Server?

thanks.
dwasswa

Re: how to verify if linux nrpe agent is running?

Post by dwasswa »

Yes,you can add multiple IP addresses.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: how to verify if linux nrpe agent is running?

Post by ikekim »

Sorry I got to ask in what format do I need to provide the multiple IP addresses?

Are the values separated by space, comma, semi colon, etc?

example of multiple ip addresses(Nagio XI servers) like this ?

only_from = 192.168.1.10, 192.168.9.11


thanks.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: how to verify if linux nrpe agent is running?

Post by npolovenko »

@ikekim They need to be separated by space, no commas in-between.

Code: Select all

only_from = 192.168.1.10 192.168.9.11
After modifying /etc/xinetd.d/nrpe file, restart your nrpe by running

Code: Select all

service xinetd restart
.
Let us know if that worked.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked