NRPE agent installation on RHEL 7.2
NRPE agent installation on RHEL 7.2
Hi Team,
We have to monitor one Linux server version RHEL 7.2.
We have done NRPE installation using below document and it completed successfully.
https://assets.nagios.com/downloads/nag ... _Agent.pdf
The problem is we are not able to start the nrpe service, not sure what we have missed.
Request you to help us on this issue.
Thanks in advance!!
We have to monitor one Linux server version RHEL 7.2.
We have done NRPE installation using below document and it completed successfully.
https://assets.nagios.com/downloads/nag ... _Agent.pdf
The problem is we are not able to start the nrpe service, not sure what we have missed.
Request you to help us on this issue.
Thanks in advance!!
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: NRPE agent installation on RHEL 7.2
On my RHEL 7 machines when I run the fullinstall script it puts the following file called "nrpe" into the /etc/xinetd.d/ directory:
Is it possible that you have xinetd disabled?
Code: Select all
# default: off
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
disable = no
per_source = 25
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
only_from = 127.0.0.1 192.168.1.100
log_on_success =
}
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: NRPE agent installation on RHEL 7.2
Hello, @RIDS_I2MP. Could you clarify how you're checking whether nrpe is running? If it's running under xinetd you won't see nrpe in the list of processes, just the xinetd daemon.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE agent installation on RHEL 7.2
I'm not the original poster. I was trying to help him out.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: NRPE agent installation on RHEL 7.2
@amunter, My bad. I changed the name in the message.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE agent installation on RHEL 7.2
Hi Team,
We tried checking using ps -ef|grep -i nrpe command, we could not see nrpe running.
I have attached the errors here, please have a look at them.
If we are start the nrpe service using below command:
systemctl start nrpe.service
We are getting "could not completed SSL handshake error".
So we stopped it and now only xinetd is running, but we are getting "(Return code of 255 is out of bounds)" error.
[root@eu2xwbl026 xinetd.d]# ps -ef|grep -i nrpe
root 6394 5531 0 11:06 pts/0 00:00:00 grep --color=auto -i nrpe
[root@eu2xwbl026 xinetd.d]# ps -ef|grep -i xinetd
root 3687 1 0 Dec06 ? 00:00:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
root 6403 5531 0 11:06 pts/0 00:00:00 grep --color=auto -i xinetd
[root@eu2xwbl026 xinetd.d]#
Please let me know if you need any details, we would be happy to provide.
We tried checking using ps -ef|grep -i nrpe command, we could not see nrpe running.
I have attached the errors here, please have a look at them.
If we are start the nrpe service using below command:
systemctl start nrpe.service
We are getting "could not completed SSL handshake error".
So we stopped it and now only xinetd is running, but we are getting "(Return code of 255 is out of bounds)" error.
[root@eu2xwbl026 xinetd.d]# ps -ef|grep -i nrpe
root 6394 5531 0 11:06 pts/0 00:00:00 grep --color=auto -i nrpe
[root@eu2xwbl026 xinetd.d]# ps -ef|grep -i xinetd
root 3687 1 0 Dec06 ? 00:00:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
root 6403 5531 0 11:06 pts/0 00:00:00 grep --color=auto -i xinetd
[root@eu2xwbl026 xinetd.d]#
Please let me know if you need any details, we would be happy to provide.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: NRPE agent installation on RHEL 7.2
Is your firewall blocking port 5666?
What is the output of the following command, run on the client machine?
Is 10.147.108.45 the IP address of your Nagios XI server?
Restart xinetd on the remote machine:
then run the following commands on the Nagios XI server and show the output:
What is the output of the following command, run on the client machine?
Code: Select all
iptables -nLRestart xinetd on the remote machine:
Code: Select all
systemctl restart xinetd.serviceCode: 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!
Re: NRPE agent installation on RHEL 7.2
Hello,
PFB the details:
Client server: 10.146.207.6 (EU2XAPL060)
Nagios sever: 10.147.108.45
I have attached the nrpe.cfg here.
Commands and output:
[nagios@EU2XAPL060 etc]$ iptables -nL
iptables v1.4.21: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
[nagios@EU2XAPL060 etc]$
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_nrpe -H 10.146.207.6
CHECK_NRPE: Error - Could not connect to 10.146.207.6: Connection reset by peer
[nagios@EU2XAPL060 etc]$
[nagios@EU2XAPL060 etc]$ nmap 10.146.207.6 -p 5666
-bash: nmap: command not found
[nagios@EU2XAPL060 etc]$
PFB the details:
Client server: 10.146.207.6 (EU2XAPL060)
Nagios sever: 10.147.108.45
I have attached the nrpe.cfg here.
Commands and output:
[nagios@EU2XAPL060 etc]$ iptables -nL
iptables v1.4.21: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
[nagios@EU2XAPL060 etc]$
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_nrpe -H 10.146.207.6
CHECK_NRPE: Error - Could not connect to 10.146.207.6: Connection reset by peer
[nagios@EU2XAPL060 etc]$
[nagios@EU2XAPL060 etc]$ nmap 10.146.207.6 -p 5666
-bash: nmap: command not found
[nagios@EU2XAPL060 etc]$
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: NRPE agent installation on RHEL 7.2
Hello,
I also ran below commands that I found from previous Nagios topics. Please check and let me know where we are missing out something.
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/cpu_ent -w 500 -c 600
-bash: /usr/local/nagios/libexec/cpu_ent: No such file or directory
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p xntpd
*** xntpd: Nok ***
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p syslogd
syslogd: 1
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p errdemon
*** errdemon: Nok ***
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p cron
cron: 1
[nagios@EU2XAPL060 etc]$ echo $SHELL
/bin/bash
[nagios@EU2XAPL060 etc]$ which sh
/usr/bin/sh
[nagios@EU2XAPL060 etc]$ which bash
/usr/bin/bash
[nagios@EU2XAPL060 etc]$ which ksh
/usr/bin/which: no ksh in (/home/nagios/perl5/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/nagios/.local/bin:/home/nagios/bin)
[nagios@EU2XAPL060 etc]$ head -1 /usr/local/nagios/libexec/check_services
#!/bin/bash
[nagios@EU2XAPL060 etc]$ sh /usr/local/nagios/libexec/check_services -p cron
cron: 1
[nagios@EU2XAPL060 etc]$
I also ran below commands that I found from previous Nagios topics. Please check and let me know where we are missing out something.
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/cpu_ent -w 500 -c 600
-bash: /usr/local/nagios/libexec/cpu_ent: No such file or directory
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p xntpd
*** xntpd: Nok ***
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p syslogd
syslogd: 1
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p errdemon
*** errdemon: Nok ***
[nagios@EU2XAPL060 etc]$ /usr/local/nagios/libexec/check_services -p cron
cron: 1
[nagios@EU2XAPL060 etc]$ echo $SHELL
/bin/bash
[nagios@EU2XAPL060 etc]$ which sh
/usr/bin/sh
[nagios@EU2XAPL060 etc]$ which bash
/usr/bin/bash
[nagios@EU2XAPL060 etc]$ which ksh
/usr/bin/which: no ksh in (/home/nagios/perl5/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/nagios/.local/bin:/home/nagios/bin)
[nagios@EU2XAPL060 etc]$ head -1 /usr/local/nagios/libexec/check_services
#!/bin/bash
[nagios@EU2XAPL060 etc]$ sh /usr/local/nagios/libexec/check_services -p cron
cron: 1
[nagios@EU2XAPL060 etc]$
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: NRPE agent installation on RHEL 7.2
Can you run the following on the remote server as root and post the output to the ticket?
Your ps output show that you could have another NRPE agent installed on the server so can you run this command as root to remove it.
Then, reinstall NRPE using the Linux Agent Installer document from your first post and see if it installs and runs this time.
Code: Select all
netstat -anp |grep 5666
systemctl restart nrpe
systemctl status nrpeCode: Select all
yum remove nrpeBe sure to check out our Knowledgebase for helpful articles and solutions!