Getting issue with NRPE agent on linux server
I already have NRPE installed on client server but i am getting below error on all nodes.
CHECK_NRPE: Error - Could not connect to 150.236.11.215: Connection reset by peer
Facing issue with NRPE no nagios core
-
- Posts: 239
- Joined: Mon Jun 27, 2016 11:05 pm
Re: Facing issue with NRPE no nagios core
What is the version of NRPE that you installed on the client?
The KB article below is written for XI but it's the same for Core:
https://support.nagios.com/kb/article/n ... e-615.html
Follow the troubleshooting steps, outlined in the article in order to fix your issue. Let us know if this helped. Thank you!
The KB article below is written for XI but it's the same for Core:
https://support.nagios.com/kb/article/n ... e-615.html
Follow the troubleshooting steps, outlined in the article in order to fix your issue. Let us know if this helped. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Facing issue with NRPE no nagios core
@ericssonvietnam, You need to add your Nagios Core server IP to the allowed hosts on the Linux agent. Depending on what Version of NRPE you have installed you need to either:
or in
Notice how in the first case the IP address are separated by space but in the second case, they're separated by a comma.
Don't forget to restart NRPE after you made changes.
Code: Select all
/etc/xinetd.d/
only_from = 127.0.0.1 Nagios_Server_IP
Code: Select all
/usr/local/nagios/etc/nrpe.cfg
allowed_hosts=127.0.0.1,Nagios_Server_IP
Don't forget to restart NRPE after you made changes.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 239
- Joined: Mon Jun 27, 2016 11:05 pm
Re: Facing issue with NRPE no nagios core
Now i am able to get the data from the node but still getting some issue with disk check after defining command as well.npolovenko wrote:@ericssonvietnam, You need to add your Nagios Core server IP to the allowed hosts on the Linux agent. Depending on what Version of NRPE you have installed you need to either:or inCode: Select all
/etc/xinetd.d/ only_from = 127.0.0.1 Nagios_Server_IP
Notice how in the first case the IP address are separated by space but in the second case, they're separated by a comma.Code: Select all
/usr/local/nagios/etc/nrpe.cfg allowed_hosts=127.0.0.1,Nagios_Server_IP
Don't forget to restart NRPE after you made changes.
[root@localhost etc]# /usr/local/nagios/libexec/check_disk -x 150.236.11.217 -w 20 -c 10 -p /dev/sda2
DISK OK - free space: / 70912 MB (77.53% inode=98%);| /=20551MB;96339;96349;0;96359
can you suggest how i can define service of the above command.
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Facing issue with NRPE no nagios core
@ericssonvietnam, Sure, in commands.cfg file you'd define:
And the service definition would look like this:
Code: Select all
define command{
command_name check_custom_path
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARGS3$
}
Code: Select all
define service{
use local-service
host_name localhost
service_description Check Custom Path
check_command check_custom_path!20!10!/dev/sda2
}
-
- Posts: 239
- Joined: Mon Jun 27, 2016 11:05 pm
Re: Facing issue with NRPE no nagios core
thanks its working now for me i installed latest nrpe on both client and server.npolovenko wrote:@ericssonvietnam, Sure, in commands.cfg file you'd define:
And the service definition would look like this:Code: Select all
define command{ command_name check_custom_path command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARGS3$ }
Code: Select all
define service{ use local-service host_name localhost service_description Check Custom Path check_command check_custom_path!20!10!/dev/sda2 }
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Facing issue with NRPE no nagios core
@ericssonvietnam, Not a problem. I will close this thread as resolved but if you encounter other problems feel free to open a new one.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.