need help with NRPE on two new server not working
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
need help with NRPE on two new server not working
None of the checks are working, we currently have 93 hosts with 800 service checks that work fine. but for some reason i cannot get these two hosts to work. Please let me know what tests i need to run in order to give you more information.
Thank you
Thank you
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: need help with NRPE on two new server not working
this is what i get for all checks
CHECK_NRPE: Socket timeout after 30 seconds.
CHECK_NRPE: Socket timeout after 30 seconds.
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: need help with NRPE on two new server not working
these boxes are VM's that were cloned with the nsclient already installed if that helps.
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: need help with NRPE on two new server not working
Both of these servers are ubuntu 16.04
-
kyang
Re: need help with NRPE on two new server not working
Wait, so you have two Ubuntu servers with NRPE installed.these boxes are VM's that were cloned with the nsclient already installed if that helps.
Are you running the nrpe daemon or xinetd?this is what i get for all checks
CHECK_NRPE: Socket timeout after 30 seconds.
Is the nrpe or xinetd service started on those Ubuntu servers?
Code: Select all
sudo systemctl status nrpe.service
sudo status nrpeCode: Select all
nmap ubuntuServerIP -p 5666-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: need help with NRPE on two new server not working
I ran the commands,
sudo systemctl status nrpe.service
[sudo] password for ronb:
â nrpe.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
sudo status nrpe
sudo: status: command not found
I am not a linux person but this tells me the client is not installed, would that be correct?
sudo systemctl status nrpe.service
[sudo] password for ronb:
â nrpe.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
sudo status nrpe
sudo: status: command not found
I am not a linux person but this tells me the client is not installed, would that be correct?
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: need help with NRPE on two new server not working
Does this mean the port is being blocked?
PORT STATE SERVICE
5666/tcp filtered nrpe
PORT STATE SERVICE
5666/tcp filtered nrpe
Re: need help with NRPE on two new server not working
Let's step back for a minute. You don't need to install NSClient++ in order to monitor Ubuntu servers via NRPE... Installing NRPE and Nagios plugins is what you need.these boxes are VM's that were cloned with the nsclient already installed if that helps.
Can you describe HOW you installed NRPE on these two servers? Did you try installing NSClient++ for Linux, compiled NRPE from source, installed it via a repo, etc.? What guide/tutorial/documentation did you follow?
Run the following commands on the both Ubuntu servers from the command line and show the output:
Code: Select all
find / -name *nrpe*
netstat -atn | grep 5666Be sure to check out our Knowledgebase for helpful articles and solutions!
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: need help with NRPE on two new server not working
The VM is a clone of one we had installed the client on previously. I did not build it, so i am unsure.
/etc/rc1.d/K01nagios-nrpe-server
/etc/rc4.d/S03nagios-nrpe-server
/etc/default/nagios-nrpe-server
/etc/rc0.d/K01nagios-nrpe-server
/etc/rc5.d/S03nagios-nrpe-server
/etc/init.d/nagios-nrpe-server
/etc/nagios/nrpe.d
/etc/nagios/nrpe.cfg
/etc/nagios/nrpe_local.cfg
/etc/rc2.d/S03nagios-nrpe-server
/etc/rc6.d/K01nagios-nrpe-server
/etc/rc3.d/S03nagios-nrpe-server
/var/lib/dpkg/info/nagios-nrpe-server.md5sums
/var/lib/dpkg/info/nagios-nrpe-server.list
/var/lib/dpkg/info/nagios-nrpe-server.postrm
/var/lib/dpkg/info/nagios-nrpe-server.preinst
/var/lib/dpkg/info/nagios-nrpe-server.conffiles
/var/lib/dpkg/info/nagios-nrpe-server.postinst
/var/lib/dpkg/info/nagios-nrpe-server.prerm
/var/lib/lxcfs/cgroup/memory/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/pids/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/blkio/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/devices/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/cpu,cpuacct/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/name=systemd/system.slice/nagios-nrpe-server.service
/run/nagios/nrpe.pid
/run/systemd/generator.late/nagios-nrpe-server.service
/run/systemd/generator.late/graphical.target.wants/nagios-nrpe-server.service
/run/systemd/generator.late/multi-user.target.wants/nagios-nrpe-server.service
/sys/fs/cgroup/memory/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/pids/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/blkio/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/devices/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/cpu,cpuacct/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/systemd/system.slice/nagios-nrpe-server.service
/usr/sbin/nrpe
/usr/share/man/man8/nrpe.8.gz
/usr/share/augeas/lenses/dist/nrpe.aug
/usr/share/augeas/lenses/dist/tests/test_nrpe.aug
/usr/share/doc/nagios-nrpe-server
ronb@WHRO:~$ netstat -atn | grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
ronb@WHRO:~$
/etc/rc1.d/K01nagios-nrpe-server
/etc/rc4.d/S03nagios-nrpe-server
/etc/default/nagios-nrpe-server
/etc/rc0.d/K01nagios-nrpe-server
/etc/rc5.d/S03nagios-nrpe-server
/etc/init.d/nagios-nrpe-server
/etc/nagios/nrpe.d
/etc/nagios/nrpe.cfg
/etc/nagios/nrpe_local.cfg
/etc/rc2.d/S03nagios-nrpe-server
/etc/rc6.d/K01nagios-nrpe-server
/etc/rc3.d/S03nagios-nrpe-server
/var/lib/dpkg/info/nagios-nrpe-server.md5sums
/var/lib/dpkg/info/nagios-nrpe-server.list
/var/lib/dpkg/info/nagios-nrpe-server.postrm
/var/lib/dpkg/info/nagios-nrpe-server.preinst
/var/lib/dpkg/info/nagios-nrpe-server.conffiles
/var/lib/dpkg/info/nagios-nrpe-server.postinst
/var/lib/dpkg/info/nagios-nrpe-server.prerm
/var/lib/lxcfs/cgroup/memory/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/pids/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/blkio/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/devices/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/cpu,cpuacct/system.slice/nagios-nrpe-server.service
/var/lib/lxcfs/cgroup/name=systemd/system.slice/nagios-nrpe-server.service
/run/nagios/nrpe.pid
/run/systemd/generator.late/nagios-nrpe-server.service
/run/systemd/generator.late/graphical.target.wants/nagios-nrpe-server.service
/run/systemd/generator.late/multi-user.target.wants/nagios-nrpe-server.service
/sys/fs/cgroup/memory/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/pids/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/blkio/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/devices/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/cpu,cpuacct/system.slice/nagios-nrpe-server.service
/sys/fs/cgroup/systemd/system.slice/nagios-nrpe-server.service
/usr/sbin/nrpe
/usr/share/man/man8/nrpe.8.gz
/usr/share/augeas/lenses/dist/nrpe.aug
/usr/share/augeas/lenses/dist/tests/test_nrpe.aug
/usr/share/doc/nagios-nrpe-server
ronb@WHRO:~$ netstat -atn | grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
ronb@WHRO:~$
Re: need help with NRPE on two new server not working
Make sure that the Nagios XI server's IP is added to the "allowed_hosts" directive in the "/etc/nagios/nrpe.cfg" file:
Save, exit, and restart the "nagios-nrpe-server" service:
Test the connection by running the following commands from the command line on the Nagios XI server:
Code: Select all
allowed_hosts=127.0.0.1,x.x.x.xCode: Select all
systemtct restart nagios-nrpe-server.serviceCode: Select all
nmap <ubuntuServerIP> -p 5666
/usr/local/nagios/libexec/check_nrpe -H <ubuntuServerIP>It is possible that port 5666 is blocked by a firewall. This is what you should see after running the nmap command:Does this mean the port is being blocked?
PORT STATE SERVICE
5666/tcp filtered nrpe
Starting Nmap 6.47 ( http://nmap.org ) at 2018-05-18 11:14 CDT
Nmap scan report for x.x.x.x
Host is up (0.00045s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Be sure to check out our Knowledgebase for helpful articles and solutions!