check_nrpe and check_disk mismatch

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
hemak88
Posts: 22
Joined: Wed Mar 29, 2017 2:31 am

Re: check_nrpe and check_disk mismatch

Post by hemak88 »

NRPE not recognized as a service.

Code: Select all

[root@client ~]# service nrpe restart
nrpe: unrecognized service
[root@client ~]#
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_nrpe and check_disk mismatch

Post by scottwilkerson »

how was nrpe started on Jul05 ?

This may solve the issue

Code: Select all

killall -9 nrpe
service xinetd restart
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
hemak88
Posts: 22
Joined: Wed Mar 29, 2017 2:31 am

Re: check_nrpe and check_disk mismatch

Post 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
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_nrpe and check_disk mismatch

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
hemak88
Posts: 22
Joined: Wed Mar 29, 2017 2:31 am

Re: check_nrpe and check_disk mismatch

Post 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 ~]#
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_nrpe and check_disk mismatch

Post by scottwilkerson »

Lets try it this way:

Code: Select all

systemctl disable nrpe
systemctl stop nrpe
service xinetd restart
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
hemak88
Posts: 22
Joined: Wed Mar 29, 2017 2:31 am

Re: check_nrpe and check_disk mismatch

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_nrpe and check_disk mismatch

Post by scottwilkerson »

do you get correct results now?

If not what shows here now

Code: Select all

ps -ef |grep nrpe
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
hemak88
Posts: 22
Joined: Wed Mar 29, 2017 2:31 am

Re: check_nrpe and check_disk mismatch

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_nrpe and check_disk mismatch

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked