We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Plugin issue from monitoring server.

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

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: 995
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 27 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: 995
Joined: Tue Dec 02, 2014 12:00 pm


Return to Community Support

Who is online

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