Getting Check NRPE Error
-
- Posts: 51
- Joined: Sun Dec 27, 2015 5:04 pm
Getting Check NRPE Error
I installed Nagios core 4.4.3 on Centos 7. I used yum --enablerepo=epel to install Nagios and Nagios plugins. On target host Ubuntu, I installed nrpe and nagios-plugins. On Ubuntu host nrpe.cfg file, I added Nagios server IP address and added a 1 for dont_blame_nrpe.
When I log into Nagios server and look at web interface for Ubuntu host I'm getting CHECK_NRPE:Error - could not connect to x.x.x.x: Connection reset by peer
I've followed many online guides and none seem to work.
On my Nagios server /online support for Nagios suggest verify if nrpe agent is running by checking /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1, I don't have that directory structure. My Nagios files are located in /etc/nagios.
On Nagios server I run service nrpe status and I get nrpe service active running. Not sure what else to do?
When I log into Nagios server and look at web interface for Ubuntu host I'm getting CHECK_NRPE:Error - could not connect to x.x.x.x: Connection reset by peer
I've followed many online guides and none seem to work.
On my Nagios server /online support for Nagios suggest verify if nrpe agent is running by checking /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1, I don't have that directory structure. My Nagios files are located in /etc/nagios.
On Nagios server I run service nrpe status and I get nrpe service active running. Not sure what else to do?
Re: Getting Check NRPE Error
How exactly did you install the nrpe agent? The offical guide is at https://support.nagios.com/kb/article/n ... rpe-8.html. If you install via another means, uninstall and use this guide to set it up.
Verify it is up and listening with:
netstat -nap | grep 5666
Verify it is up and listening with:
netstat -nap | grep 5666
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 51
- Joined: Sun Dec 27, 2015 5:04 pm
Re: Getting Check NRPE Error
Hi @cdienger,
The way I installed nrpe agent from nagios server I entered yum --enablerepo=epel -y install nagios-plugins-nrpe. In the past I've installed nrpe agent in this way and it has worked with no issues. If nrpe is the reason why nagios monitroing service is not working then I will uninstall nrpe. I really don't like uninstalling stuff on CentOS 7. Every time I uninstall a service another program stops working. What is the correct way to uninstall nrpe?
I'm not 100% convince nrpe is the issue because when I enter netstat -nap | grep 5666 I do see port 5666 open and nrpe is listening. I'll attach pic.
also, when I enter service nrpe status I get output active running, and get a warning that Daemon is configured to accept command arguments from clients. I'll attach pic so you can see.
I did notice nagios web interface is now displaying a new error message from a CentOS 7 machine I want monitored, and the new error is (No output stdout) stderr: connect to address xxx.xxx.x.xxx port 5666: Connection refused. Before the error was CHECK_NRPE: Error - Could not connect to xxx.xxx.x.x: Conection reset by peer.
The way I installed nrpe agent from nagios server I entered yum --enablerepo=epel -y install nagios-plugins-nrpe. In the past I've installed nrpe agent in this way and it has worked with no issues. If nrpe is the reason why nagios monitroing service is not working then I will uninstall nrpe. I really don't like uninstalling stuff on CentOS 7. Every time I uninstall a service another program stops working. What is the correct way to uninstall nrpe?
I'm not 100% convince nrpe is the issue because when I enter netstat -nap | grep 5666 I do see port 5666 open and nrpe is listening. I'll attach pic.
also, when I enter service nrpe status I get output active running, and get a warning that Daemon is configured to accept command arguments from clients. I'll attach pic so you can see.
I did notice nagios web interface is now displaying a new error message from a CentOS 7 machine I want monitored, and the new error is (No output stdout) stderr: connect to address xxx.xxx.x.xxx port 5666: Connection refused. Before the error was CHECK_NRPE: Error - Could not connect to xxx.xxx.x.x: Conection reset by peer.
Re: Getting Check NRPE Error
It sounds like there may be a firewall blocking tcp port 5666. Run the following on the XI command line to check:
nmap ubuntu_machine_ip -p 5666
nmap ubuntu_machine_ip -p 5666
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 51
- Joined: Sun Dec 27, 2015 5:04 pm
Re: Getting Check NRPE Error
Hi,
I ran nmap command and Ubuntu port 5666 does appear to be open. I attached pic.
I wonder what is causing this issue. My Windows machines are being monitored but none of my Linux servers aren't working. Then again nrpe isn't installed on Windows servers. I'm using NSCLient for Windows.
I ran nmap command and Ubuntu port 5666 does appear to be open. I attached pic.
I wonder what is causing this issue. My Windows machines are being monitored but none of my Linux servers aren't working. Then again nrpe isn't installed on Windows servers. I'm using NSCLient for Windows.
Re: Getting Check NRPE Error
Please provide the nrpe.cfg from the Ubuntu server so we can confirm the config.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 51
- Joined: Sun Dec 27, 2015 5:04 pm
Re: Getting Check NRPE Error
Hi there @cdienger,
Attached pic is nrpe.cfg from Ubuntu server.
Thank you for your time and assistance @cdienger.
Attached pic is nrpe.cfg from Ubuntu server.
Thank you for your time and assistance @cdienger.
- Attachments
-
- nrpe.txt
- (8.22 KiB) Downloaded 433 times
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Getting Check NRPE Error
@ep7network, On the Ubuntu nrpe server please navigate to /usr/local/nagios/libexec/ folder, run the following commands and show us the output:
Finally, please show me the output of ps -ef. You can upload the /tmp/support.txt file in this thread../check_nrpe -H 127.0.0.1
And
./check_nrpe -H replace_with_the_ubuntu_server_internal_ip
ps -ef > /tmp/suport.txt
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 51
- Joined: Sun Dec 27, 2015 5:04 pm
Re: Getting Check NRPE Error
When I login to Ubuntu nrpe server. There is no directory for /usr/local/nagios/libexec.
If I go to /usr/lib/nagios/plugins I do see many check_xxxx commands but not check_nrpe!
On Ubuntu I can go to directory /etc/nagios/ and see nrpe.cfg file.
On Ubuntu, I ran ps -ef and I uploaded to this thread just in case.
From nagios server I ran ./check_ -H Ubuntu IP Address and received NRPE v2.15.
If I go to /usr/lib/nagios/plugins I do see many check_xxxx commands but not check_nrpe!
On Ubuntu I can go to directory /etc/nagios/ and see nrpe.cfg file.
On Ubuntu, I ran ps -ef and I uploaded to this thread just in case.
From nagios server I ran ./check_ -H Ubuntu IP Address and received NRPE v2.15.
- Attachments
-
- support.txt
- (17.37 KiB) Downloaded 366 times
-
- Posts: 51
- Joined: Sun Dec 27, 2015 5:04 pm
Re: Getting Check NRPE Error
Ubuntu host is up. Not exactly sure what I did but I do remember entering sudo /etc/init.d/nagios-nrpe-server restart and then going to Nagios server and entering check_nrpe -H Ubuntu-IP-Address and received output NRPE v2.15. I then looked at Nagios web interface and Ubunut is working.
Thank you @cdienger and @npolovenko for all your help.
Thank you @cdienger and @npolovenko for all your help.