Page 2 of 3

Re: check_nrpe and check_disk mismatch

Posted: Sat Jul 28, 2018 11:37 pm
by hemak88
NRPE not recognized as a service.

Code: Select all

[root@client ~]# service nrpe restart
nrpe: unrecognized service
[root@client ~]#

Re: check_nrpe and check_disk mismatch

Posted: Mon Jul 30, 2018 7:38 am
by scottwilkerson
how was nrpe started on Jul05 ?

This may solve the issue

Code: Select all

killall -9 nrpe
service xinetd restart

Re: check_nrpe and check_disk mismatch

Posted: Tue Jul 31, 2018 6:14 am
by hemak88
nrpe is configured under xinetd service. Hence the process exist.

Code: Select all

[root@clientname ~]# cat /etc/xinetd.d/nrpe
# default: off
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
    disable         = no
    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 <nagiosserverIP>
    log_on_failure  += USERID
}

Re: check_nrpe and check_disk mismatch

Posted: Tue Jul 31, 2018 8:18 am
by scottwilkerson
hemak88 wrote:nrpe is configured under xinetd service. Hence the process exist.
When running under xinetd it will not show in the process list like you showed.

Did you run the commands like I recommended?
scottwilkerson wrote:

Code: Select all

killall -9 nrpe
service xinetd restart

Re: check_nrpe and check_disk mismatch

Posted: Thu Aug 02, 2018 12:14 am
by hemak88
Did you run the commands like I recommended?
Yes I did.

Code: Select all

[root@clientname ~]# kill -9 nrpe
-bash: kill: nrpe: arguments must be process or job IDs
[root@clientname~]# ps -ef |grep nrpe
root     57074 57017  0 09:12 pts/0    00:00:00 grep nrpe
nagios   61841     1  0 Jul31 ?        00:00:02 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
[root@clientname ~]# kill -9 61841
[root@clientname ~]# service xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
[root@clientname ~]# ps -ef |grep nrpe
nagios   57222     1  0 09:13 ?        00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
root     57277 57017  0 09:13 pts/0    00:00:00 grep nrpe
[root@clientname ~]#

Re: check_nrpe and check_disk mismatch

Posted: Thu Aug 02, 2018 7:50 am
by scottwilkerson
Lets try it this way:

Code: Select all

systemctl disable nrpe
systemctl stop nrpe
service xinetd restart

Re: check_nrpe and check_disk mismatch

Posted: Sun Aug 12, 2018 1:43 am
by hemak88

Code: Select all

[root@clientname ~]# service nrpe stop
nrpe: unrecognized service
[root@clientname ~]# service xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
[root@clientname ~]#
It is an RHEL 6 server.

Re: check_nrpe and check_disk mismatch

Posted: Mon Aug 13, 2018 8:59 am
by scottwilkerson
do you get correct results now?

If not what shows here now

Code: Select all

ps -ef |grep nrpe

Re: check_nrpe and check_disk mismatch

Posted: Tue Aug 14, 2018 7:07 am
by hemak88

Code: Select all

[root@clientname ~]# ps -ef |grep nrpe
root     37690 37661  0 16:06 pts/0    00:00:00 grep nrpe
nagios   57222     1  0 Aug02 ?        00:00:13 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
[root@clientname ~]#
Still the same

Re: check_nrpe and check_disk mismatch

Posted: Tue Aug 14, 2018 7:54 am
by scottwilkerson
So this process is running since Aug02 and is not part of xinetd

run

Code: Select all

kill -9 57222
service xinetd restart