Nagios server not able to connect to Linux Servers
-
steelwedge
- Posts: 69
- Joined: Fri Apr 24, 2015 4:58 am
Nagios server not able to connect to Linux Servers
Dear Team,
We have added our linux ubuntu server in Nagios XI monitoring by following the below documents, we are getting the following error message in the Nagios XI web interface.
OUTPUT: CHECK_NRPE: Error receiving data from daemon.
https://assets.nagios.com/downloads/nag ... _Agent.pdf
We tried the solutions in the below documents, it didn't helped. Please check and help us.
https://assets.nagios.com/downloads/nag ... utions.pdf
Regards,
Mohan
We have added our linux ubuntu server in Nagios XI monitoring by following the below documents, we are getting the following error message in the Nagios XI web interface.
OUTPUT: CHECK_NRPE: Error receiving data from daemon.
https://assets.nagios.com/downloads/nag ... _Agent.pdf
We tried the solutions in the below documents, it didn't helped. Please check and help us.
https://assets.nagios.com/downloads/nag ... utions.pdf
Regards,
Mohan
Re: Nagios server not able to connect to Linux Servers
What is the check command for the service that is showing that output from NRPE?
Also, is that the result of a check, or are you running the 'test command' from the CCM?
Also, is that the result of a check, or are you running the 'test command' from the CCM?
Former Nagios Employee
Re: Nagios server not able to connect to Linux Servers
Can you show us the actual check that you are running from the command line, along with the output of it?
Example:
Also, run the following commands and show the output:
On the remote (Ubuntu) machine:
On the Nagios XI box:
Example:
Code: Select all
[root@localhost tmp]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_users -a '-w 3 -c 5'
USERS OK - 2 users currently logged in |users=2;3;5;0On the remote (Ubuntu) machine:
Code: Select all
uname -a
cat /etc/*release
ip addr | grep global | grep -m 1 'inet' | awk '/inet[^6]/{print substr($2,0)}' | sed 's|/.*||'
find / -name nrpeCode: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip>
nmap <client ip> -p 5666Be sure to check out our Knowledgebase for helpful articles and solutions!
-
steelwedge
- Posts: 69
- Joined: Fri Apr 24, 2015 4:58 am
Re: Nagios server not able to connect to Linux Servers
Please find below are the requested details.
Below are the commands output which we ran on remote linux server.
administrator@swtestviper03:~$ uname -a
Linux swtestviper03 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
administrator@swtestviper03:~$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
administrator@swtestviper03:~$ ip addr | grep global | grep -m 1 'inet' | awk '/inet[^6]/{print substr($2,0)}' | sed 's|/.*||'
10.7.1.182
Below are the commands output which we ran on Nagios Server.
[root@swnagios ~]# /usr/local/nagios/libexec/check_nrpe -H 10.7.1.182
NRPE v2.15
You have mail in /var/spool/mail/root
[root@swnagios ~]# nmap 10.7.1.182 -p 5666
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-21 20:34 PDT
Nmap scan report for swtestviper03.test.steelwedge.com (10.7.1.182)
Host is up (0.00074s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Nmap done: 1 IP address (1 host up) scanned in 0.57 seconds
Below are the commands output which we ran on remote linux server.
administrator@swtestviper03:~$ uname -a
Linux swtestviper03 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
administrator@swtestviper03:~$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
administrator@swtestviper03:~$ ip addr | grep global | grep -m 1 'inet' | awk '/inet[^6]/{print substr($2,0)}' | sed 's|/.*||'
10.7.1.182
Below are the commands output which we ran on Nagios Server.
[root@swnagios ~]# /usr/local/nagios/libexec/check_nrpe -H 10.7.1.182
NRPE v2.15
You have mail in /var/spool/mail/root
[root@swnagios ~]# nmap 10.7.1.182 -p 5666
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-21 20:34 PDT
Nmap scan report for swtestviper03.test.steelwedge.com (10.7.1.182)
Host is up (0.00074s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Nmap done: 1 IP address (1 host up) scanned in 0.57 seconds
Re: Nagios server not able to connect to Linux Servers
The port 5666 is open, NRPE is running, and you can obtain the NRPE version number. So far, so good. What is the output of the command below?
Can you show us the actual check that is failing, run from the command line, along with the output of it? Also, post the nrpe.cfg and common.cfg from the Ubuntu machine.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.7.1.182 -c check_users -a '-w 3 -c 5'Be sure to check out our Knowledgebase for helpful articles and solutions!
-
spcmidrange
- Posts: 47
- Joined: Fri Jun 15, 2012 12:54 pm
Re: Nagios server not able to connect to Linux Servers
I would also run them as the Nagios user to test. As root, everything works. But NRPE and the checks usually run as the nagios user
-
steelwedge
- Posts: 69
- Joined: Fri Apr 24, 2015 4:58 am
Re: Nagios server not able to connect to Linux Servers
what would be the password for nagios user as we didn't created that manually, as per the information in the document the nagios user will be created automatically when we run the ./fullinstall script.
Re: Nagios server not able to connect to Linux Servers
Our script doesn't assign a password to the nagios user. It is entirely up to you if you want to set a password or not. Run the command from my previous post as root, and as nagios user, and show the output:
Post the nrpe.cfg and common.cfg from the Ubuntu machine on the forum.
Also, show us the actual check that is failing, run from the command line, along with the output of it.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 192.168.3.30 -c check_users -a '-w 3 -c 5'
su -l nagios -c "/usr/local/nagios/libexec/check_nrpe -H 192.168.3.30 -c check_users -a '-w 3 -c 5'"Also, show us the actual check that is failing, run from the command line, along with the output of it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
steelwedge
- Posts: 69
- Joined: Fri Apr 24, 2015 4:58 am
Re: Nagios server not able to connect to Linux Servers
This issue has been resolved by enabling the SSL while adding the linux server in CCM configuration wizard.
Re: Nagios server not able to connect to Linux Servers
Glad to hear this is resolved and thanks for posting the solution. I'll close this one out now...
Be sure to check out the Knowledgebase for helpful articles and solutions!