z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Plugin issue from monitoring server.

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.

Plugin issue from monitoring server.

Postby rijo.r » Fri Jan 21, 2022 7:28 am

Hi all,

I have an issue with NTP plugin. getting plugin output on ubuntu local server. but getting wrong output on monitoring server with NRPE.

Note : this issue only on ubuntu (Working fine on RHEL and Cetos)

used plugin link :https://exchange.nagios.org/directory/Plugins/Network-Protocols/NTP-and-Time/check_ntp%28chrony%29/details

check command in nrpe.cfg
command[checkntp]=/usr/lib/nagios/plugins/check_chrony.sh 5 10
"/usr/local/nagios/etc/nrpe.cfg" 371L, 12978C

plugin out on local server

:/usr/lib/nagios/plugins# /usr/lib/nagios/plugins/check_chrony.sh 5 10
OK - time is 0.000922904 slow of NTP Time
|Time Differences in=0.000922904

plugin out on remote server using NRPE.
[root@localhost plugins]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.191.134 -c checkntp
Please provide only number in the warining and critical values

requesting to provide a solution for this issue
rijo.r
 
Posts: 2
Joined: Fri Jan 21, 2022 6:59 am

Re: Plugin issue from monitoring server.

Postby gormank » Fri Jan 21, 2022 6:21 pm

Is the checkntp command defined in nrpe.cfg on the 192.168.191.134?
What do you get when you run the following on 192.168.191.134?
grep checkntp /usr/local/nagios/etc/nrpe.cfg
Did you restart nrpe/xinetd?
It looks like the please message is in the check script and is getting something in the command definition it doesn't like.
gormank
 
Posts: 1125
Joined: Tue Dec 02, 2014 12:00 pm

Re: Plugin issue from monitoring server.

Postby rijo.r » Wed Jan 26, 2022 10:25 am

Hi gormank,

Thanks for your response

check command is mentioned in nrpe.cfg and restarted the NRPE also.
we have getting the script out on local server but observing issue with NRPE on Ubuntu 20.04.3

please refer the below configurations and also I'm attaching the check_chrony script

nrpe.cfg configuration
allowed_hosts=127.0.0.1,::1,192.168.191.135
dont_blame_nrpe=1
command[checkntp]=/usr/lib/nagios/plugins/check_chrony.sh 5 10


root@user:/usr/lib/nagios/plugins# /usr/lib/nagios/plugins/check_chrony.sh 5 10
OK - time is 0.006876635 slow of NTP Time
|Time Differences in=0.006876635

from remote server with NRPE

[root@localhost ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.191.134 -c checkntp
Please provide only number in the warining and critical values
[root@localhost ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.191.134
NRPE v4.0.0
Attachments
check_chrony.sh
(2.17 KiB) Downloaded 46 times
rijo.r
 
Posts: 2
Joined: Fri Jan 21, 2022 6:59 am

Re: Plugin issue from monitoring server.

Postby gormank » Thu Jan 27, 2022 12:44 pm

The command defined looks fine to me. My best guess is that there are two commands with the same name defined. Maybe try grepping the command name from nrpe.cfg and in any included files if nrpe.cfg has an include dir defined.
gormank
 
Posts: 1125
Joined: Tue Dec 02, 2014 12:00 pm


Return to Open Source Nagios Projects

Who is online

Users browsing this forum: Google [Bot] and 18 guests