NRPE agent not working on Oracle Linux 7
NRPE agent not working on Oracle Linux 7
Hello,
We are now planning to switch from Nagios Core to Nagios Xl to monitor both Linux and Windows servers. But I have some questions about Nagios Xl on Linux.
1. I installed NRPE agent on one of Oracle Linux 7 servers. But the monitoring host seems not able to communication with it. The status shows "Return code of 255 is out of bounds".
2. Since we are currently using Nagios Core, I installed NRPE plugin on all of our Linux servers. But it doesn't work with Nagios Xl. Do I have to remove NRPE plugin and install NRPE agent? How can I remove the plugin? I couldn't find any documentation for that.
Thank you for your help!
Hong Kang
We are now planning to switch from Nagios Core to Nagios Xl to monitor both Linux and Windows servers. But I have some questions about Nagios Xl on Linux.
1. I installed NRPE agent on one of Oracle Linux 7 servers. But the monitoring host seems not able to communication with it. The status shows "Return code of 255 is out of bounds".
2. Since we are currently using Nagios Core, I installed NRPE plugin on all of our Linux servers. But it doesn't work with Nagios Xl. Do I have to remove NRPE plugin and install NRPE agent? How can I remove the plugin? I couldn't find any documentation for that.
Thank you for your help!
Hong Kang
Re: NRPE agent not working on Oracle Linux 7
How did you install the agent? Can you show the output of it failing from the command line? (Output from the XI server, check failing to the remote server)hkang wrote:I installed NRPE agent on one of Oracle Linux 7 servers. But the monitoring host seems not able to communication with it. The status shows "Return code of 255 is out of bounds".
What do you mean it doesn't work with Nagios XI? NRPE won't need to be reinstalled on the remote servers. You will likely need to update the configuration to allow the IP of the XI server to communicate with the NRPE agent.hkang wrote:Since we are currently using Nagios Core, I installed NRPE plugin on all of our Linux servers. But it doesn't work with Nagios Xl. Do I have to remove NRPE plugin and install NRPE agent? How can I remove the plugin? I couldn't find any documentation for that.
Former Nagios Employee.
me.
me.
Re: NRPE agent not working on Oracle Linux 7
1. My first attempt of the installation failed. I got the error "can't read /etc/xinetd.d/nrpe: No such file or directory". Then I created the nrpe file manually. Finally, install complete successfully. But I got the status of "Return code of 255 is out of bounds" from monitoring host. Here is the nrpe file:
# 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/sbin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 10.200.160.93
}
2. I modified the nrpe config file (/usr/local/nagios/etc/nrpe.cfg) and changed the allowed_hosts to the current Xl server IP, but still got the status of "CHECK_NRPE: Error - Could not complete SSL handshake." from monitoring host.
# 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/sbin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 10.200.160.93
}
2. I modified the nrpe config file (/usr/local/nagios/etc/nrpe.cfg) and changed the allowed_hosts to the current Xl server IP, but still got the status of "CHECK_NRPE: Error - Could not complete SSL handshake." from monitoring host.
Re: NRPE agent not working on Oracle Linux 7
From the command line of the Nagios server, can you try running /usr/local/nagios/libexec/check_nrpe -H ipofmachine -n and post the result? (change ipofmachine to the client machine running NRPE)
Former Nagios Employee
Re: NRPE agent not working on Oracle Linux 7
1. connect to address ipofmachine port 5666: No route to host
2. CHECK_NRPE: Error receiving data from daemon.
2. CHECK_NRPE: Error receiving data from daemon.
Re: NRPE agent not working on Oracle Linux 7
To me it seems like there are two problems at play here.
First, you have one (or many) Oracle Linux 7 boxes that appear to not work with NRPE. Is that statement correct?
Second, you are migrating from Nagios Core to Nagios XI, implying that you had NRPE working in the past. I assume that you never had NRPE working on your Oracle Linux 7 boxes?
I think it would be best to focus on one of the above problems at a time so that we don't get our wires crossed.
First, you have one (or many) Oracle Linux 7 boxes that appear to not work with NRPE. Is that statement correct?
Second, you are migrating from Nagios Core to Nagios XI, implying that you had NRPE working in the past. I assume that you never had NRPE working on your Oracle Linux 7 boxes?
I think it would be best to focus on one of the above problems at a time so that we don't get our wires crossed.
Re: NRPE agent not working on Oracle Linux 7
You are right. These are two different issues on two different Linux servers.
The first message was from Oracle Linux 7 box, and this is the first time I try NRPE on OL 7.
The second message was from another Oracle Linux 6.7 box, and I am moving from Core to XI on this one. I installed NRPE plugin (nrpe-2.15.tar.gz) before, and it worked fine with Core monitoring host. But it doesn't work with XI monitoring host.
We can definitely work on only one problem at a time. How about the first one?
Thank you!
The first message was from Oracle Linux 7 box, and this is the first time I try NRPE on OL 7.
The second message was from another Oracle Linux 6.7 box, and I am moving from Core to XI on this one. I installed NRPE plugin (nrpe-2.15.tar.gz) before, and it worked fine with Core monitoring host. But it doesn't work with XI monitoring host.
We can definitely work on only one problem at a time. How about the first one?
Thank you!
Re: NRPE agent not working on Oracle Linux 7
The first one sounds good to me. 
First of all, it looks like you used the fullinstall script on your Oracle Linux box and the script completed successfully. Is that correct?
I'd like you to check on the following for me please -
Is xinetd running?
Is 10.200.160.93 the correct IP of your Nagios Server? Please verify that Nagios isn't going through any sort of NAT to get to the remote server.
Please add 127.0.0.1 to the xinetd config file, like so:
After adding localhost, attempt to run the following _from your Oracle Linux 7 box_.
First of all, it looks like you used the fullinstall script on your Oracle Linux box and the script completed successfully. Is that correct?
I'd like you to check on the following for me please -
Is xinetd running?
Code: Select all
service xinetd statusPlease add 127.0.0.1 to the xinetd config file, like so:
Code: Select all
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/sbin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 10.200.160.93 127.0.0.1
}Code: Select all
cd /usr/loca/nagios/libexec
./check_nrpe -H 127.0.0.1Re: NRPE agent not working on Oracle Linux 7
1. Yes. xinetd is running. Here is the output:
Redirecting to /bin/systemctl status xinetd.service
xinetd.service - Xinetd A Powerful Replacement For Inetd
Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled)
Active: active (running) since Thu 2016-01-07 02:00:43 CST; 10h ago
Process: 1424 ExecStart=/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid $EXTRAOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1435 (xinetd)
CGroup: /system.slice/xinetd.service
└─1435 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing discard
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing discard
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing echo
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing echo
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing tcpmux
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing time
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing time
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: Must specify a server in nrpe
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: xinetd Version 2.3.15 started with libwrap loadavg labeled-networking...d in.
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: Started working: 1 available service
Hint: Some lines were ellipsized, use -l to show in full.
2. IP address of Nagios server is correct. The xinetd config file is modified.
3. The output of ./check_nrpe -H 127.0.0.1:
-bash: ./check_nrpe: No such file or directory
Redirecting to /bin/systemctl status xinetd.service
xinetd.service - Xinetd A Powerful Replacement For Inetd
Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled)
Active: active (running) since Thu 2016-01-07 02:00:43 CST; 10h ago
Process: 1424 ExecStart=/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid $EXTRAOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1435 (xinetd)
CGroup: /system.slice/xinetd.service
└─1435 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing discard
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing discard
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing echo
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing echo
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing tcpmux
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing time
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: removing time
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: Must specify a server in nrpe
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: xinetd Version 2.3.15 started with libwrap loadavg labeled-networking...d in.
Jan 07 02:00:43 calendar-310-uaex-edu xinetd[1435]: Started working: 1 available service
Hint: Some lines were ellipsized, use -l to show in full.
2. IP address of Nagios server is correct. The xinetd config file is modified.
3. The output of ./check_nrpe -H 127.0.0.1:
-bash: ./check_nrpe: No such file or directory
Re: NRPE agent not working on Oracle Linux 7
It looks like there was a typo in this part of the command:hkang wrote:3. The output of ./check_nrpe -H 127.0.0.1:
Code: Select all
cd /usr/loca/nagios/libexecCode: Select all
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
Former Nagios Employee.
me.
me.