service nrpe restart

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

service nrpe restart

Postby donnyforbes » Mon Jun 19, 2017 2:13 pm

I have installed this nrpe client on several RHEL and got this working. I still have two CentOS release 6.6 machines left, but running into an issue.
The issue I am having is as followed.

When trying to test communication with the NRPE daemon so from the NAG sever to the remote Centos Machine I am getting the following error.

[root@nag objects]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12
CHECK_NRPE: Error - Could not connect to 192.168.1.12: Connection reset by peer

I checked the /var/log/messages and I am seeing this
Jun 19 12:07:04 proxy4gl nrpe[41146]: Host 192.168.1.186 is not allowed to talk to us!

I have verified the firewall by
[root@proxy4gl xinetd.d]# netstat -an |grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
tcp 0 0 :::5666 :::* LISTEN

[root@proxy4gl xinetd.d]# netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:662 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:892 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN

I have verified that nrpe is running
[root@proxy4gl xinetd.d]# ps -ef |grep nrpe
nagios 37800 1 0 11:20 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
root 41155 17022 0 12:08 pts/0 00:00:00 grep nrpe

I have modified the following file ..
[root@proxy4gl etc]# cat nrpe.cfg |grep 192.168.1.186
allowed_hosts=127.0.0.1, 192.168.1.186

Another thing I have verified that /etc/xinetd.d was running
[root@proxy4gl etc]# service xinetd status
xinetd (pid 37759) is running...

The strange thing is. In all of my other installs I had the following /etc/xinetd.d/nrpe file that I was able to add the Nag server ip to, however I don't see it on this one. I am not sure why.

[root@proxy4gl etc]# ls /etc/xinetd.d/
chargen-dgram cups-lpd daytime-stream discard-stream echo-stream tcpmux-server time-stream
chargen-stream daytime-dgram discard-dgram echo-dgram rsync time-dgram

I tried to restart nrpe using the following command but it did not work.
[root@proxy4gl etc]# service nrpe restart
nrpe: unrecognized service

Any help would be appreciated. Thanks
donnyforbes
 
Posts: 244
Joined: Tue Jun 13, 2017 2:17 pm

Re: service nrpe restart

Postby dwhitfield » Mon Jun 19, 2017 2:41 pm

Did you compile, install from repos, or did you use the instructions at https://assets.nagios.com/downloads/nag ... _Agent.pdf ?

If you compiled, did you use our instructions? https://support.nagios.com/kb/article.php?id=515#CentOS

It might be best to just blow away everything related to NRPE on that server and start over with a known method.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3756
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: service nrpe restart

Postby donnyforbes » Mon Jun 19, 2017 3:58 pm

Ok I will use this method https://support.nagios.com/kb/article.php?id=515#CentOS
could you tell me how to blow everything away easily and quickly ?
donnyforbes
 
Posts: 244
Joined: Tue Jun 13, 2017 2:17 pm

Re: service nrpe restart

Postby donnyforbes » Mon Jun 19, 2017 4:06 pm

Ok I got everything remove I will proceed. Thanks
donnyforbes
 
Posts: 244
Joined: Tue Jun 13, 2017 2:17 pm

Re: service nrpe restart

Postby dwhitfield » Mon Jun 19, 2017 4:08 pm

For future reference, I suppose, since I already have it typed up.

Take a look at the output of rpm -qa | grep nrpe. If nothing, then find / -name *nrpe* should give you a list of everything you need to remove.

If rpm does return something, uninstall those packages first, then run the find command and remove everything it finds.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3756
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: service nrpe restart

Postby donnyforbes » Mon Jun 19, 2017 4:24 pm

This https://support.nagios.com/kb/article.php?id=515#CentOS worked perfect thanks. Will this work for RHEL 7 as well?
donnyforbes
 
Posts: 244
Joined: Tue Jun 13, 2017 2:17 pm

Re: service nrpe restart

Postby dwhitfield » Mon Jun 19, 2017 4:35 pm

Yes, ***BUT***...make sure you pay attention where the document is broken into 5.x/6.x sections and 7.x sections.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3756
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: service nrpe restart

Postby donnyforbes » Mon Jun 19, 2017 4:47 pm

Got it thanks
donnyforbes
 
Posts: 244
Joined: Tue Jun 13, 2017 2:17 pm

Re: service nrpe restart

Postby dwhitfield » Mon Jun 19, 2017 4:49 pm

np. Let us know if you run into any issues.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3756
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC


Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot] and 4 guests