Problem with the PING monitor by NRPE
-
neo_infraestructura
- Posts: 61
- Joined: Wed Jan 17, 2018 3:55 pm
Problem with the PING monitor by NRPE
Hello everyone,
We are having trouble monitoring some devices. The monitoring is done through NRPE, making the request to an Linux server (Centos), who performs the corresponding checks with the device to monitor and then it send the results to Nagios. At least the services go well, but the PING made to the device gives a negative result, being that manually the PING from de Linux server does respond. In the attachments are the examples.
We suspect that the PING is being made directly and not through the Linux server, but we don’t know how to check or review it.
Any help or tips would be much appreciated!
We are having trouble monitoring some devices. The monitoring is done through NRPE, making the request to an Linux server (Centos), who performs the corresponding checks with the device to monitor and then it send the results to Nagios. At least the services go well, but the PING made to the device gives a negative result, being that manually the PING from de Linux server does respond. In the attachments are the examples.
We suspect that the PING is being made directly and not through the Linux server, but we don’t know how to check or review it.
Any help or tips would be much appreciated!
You do not have the required permissions to view the files attached to this post.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Problem with the PING monitor by NRPE
Hello, @neo_infraestructura . Please navigate to /usr/local/nagios/libexec/ and run the following commands and show us the output:
Also please go to the Core Configurations Manager, find the host 172.30.1.145, click on it and take a screenshot of the Host Management Page.
Code: Select all
./check_icmp -H 172.30.1.145
./check_ping -H 172.30.1.145 -w1,1% -c1,1%
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
neo_infraestructura
- Posts: 61
- Joined: Wed Jan 17, 2018 3:55 pm
Re: Problem with the PING monitor by NRPE
Hi @npolovenko, here are the images you ask for:
Just to say, the connection can't be from Nagios directly, but it can be made from the Linux server, that's why we are trying to make the monitoring throw the Linux server by NRPE, and it works, but the PING is the problem.
Just to say, the connection can't be from Nagios directly, but it can be made from the Linux server, that's why we are trying to make the monitoring throw the Linux server by NRPE, and it works, but the PING is the problem.
You do not have the required permissions to view the files attached to this post.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Problem with the PING monitor by NRPE
@neo_infraestructura, The first screenshot I was expecting to be from the XI Core Configurations Manager menu because it shows the command with arguments. Are you using Nagios XI or Nagios Core? I'm trying to see how the service is defined on the Nagios server, as well as the command.
Thank you.
In this case, please also upload the command definition from the monitored server, you should find it in the /usr/local/nagios/nrpe.cfg file.the connection can't be from Nagios directly, but it can be made from the Linux server
Thank you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
neo_infraestructura
- Posts: 61
- Joined: Wed Jan 17, 2018 3:55 pm
Re: Problem with the PING monitor by NRPE
Please if this aren't the images you need, give me an example where to take the screenshot
You do not have the required permissions to view the files attached to this post.
Re: Problem with the PING monitor by NRPE
The '$HOSTADDRESS$' macro, that you are using in your command on the Nagios XI server should resolve to the IP address of the host, where the NRPE is installed. What you need is the ip of the host that you are trying to ping from the NRPE server (as you can't do it from the XI box)...
Can you run the following command on the Nagios XI server and show the output?
If you really want to use a macro (instead of showing the actual IP in the command), you could set a user macro in the resource.cfg file instead. Read more about user macros here:
https://assets.nagios.com/downloads/nag ... Macros.pdf
Can you run the following command on the Nagios XI server and show the output?
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <ip of the nrpe server> -c check_alive_ping -a '<ip of the server you are trying to ping>'
https://assets.nagios.com/downloads/nag ... Macros.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
neo_infraestructura
- Posts: 61
- Joined: Wed Jan 17, 2018 3:55 pm
Re: Problem with the PING monitor by NRPE
Here is the command you asked for. As you can see, the result is correct and there is no problem making the PING manually from Nagios throw NRPE, but still can't figure out why Nagiosxi is failing in this request. I think Nagios is making the PING directly, so the command 'check_alive_ping' is being excecuted directly to the '$HOSTADDRESS$' and not going throw the NRPE, but can't see where I can change that.
My suspicion is because before the monitoring was directly from Nagios, but with some changes in the FireWalls the monitoring have to be by NRPE throw the Linux Server , so I don't know if somewhere in Nagios the PING configuration in Nagios never changed.
My suspicion is because before the monitoring was directly from Nagios, but with some changes in the FireWalls the monitoring have to be by NRPE throw the Linux Server , so I don't know if somewhere in Nagios the PING configuration in Nagios never changed.
You do not have the required permissions to view the files attached to this post.
Re: Problem with the PING monitor by NRPE
Can you post the host config file from the Nagios server, along with all relevant templates, used by this check?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
neo_infraestructura
- Posts: 61
- Joined: Wed Jan 17, 2018 3:55 pm
Re: Problem with the PING monitor by NRPE
The problem was fixed. I searched for the object.cache in /var/nagiosramdisk/objects.cache and I saw that all the devices has a field called "check_command" and it had other description that doesn't made the ping through NRPE. Changing that to 'check_host_alive_nrpe' and it works.
Thanks for all the help and sorry to bother!
Thanks for all the help and sorry to bother!
Re: Problem with the PING monitor by NRPE
I am glad your issue was resolved! Locking the topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!