check_procs MisConfiguration or UnExpected Result!

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.
Locked
yks0000
Posts: 1
Joined: Wed Jul 16, 2014 10:19 am

check_procs MisConfiguration or UnExpected Result!

Post by yks0000 »

I need an help with below as I am new to Nagios. I am seeing an Unexpected result in UI than CLI.



Command Definition:


define command{
command_name check_procs
command_line $USER1$/check_procs -c $ARG1$ -a $ARG2$
}



Service Defn:

define service{
use local-service
host_name vm-ser-repo-01.initd.in
service_description Proc - DHCP
check_command check_procs!-c!1:!-a!'dhcpd'
notifications_enabled 1
}



Once I tried manually it shows expected output i.e.

[root@vm-ser-repo-01 objects]# /usr/local/nagios/libexec/check_procs -c 1: -a dhcpd
PROCS OK: 1 process with args 'dhcpd' | procs=1;;1:;0;
[root@vm-ser-repo-01 objects]#


But Nagios UI Shows as below, i.e. instead of showing arg as dhcpd it shows arg as 1 in UI

PROCS OK: 0 processes with args '1:'


Please help.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_procs MisConfiguration or UnExpected Result!

Post by tmcdonald »

Change your service definition line to this:

Code: Select all

check_command check_procs!1:!'dhcpd'
You were passing 4 arguments to a command that only expected 2.
Former Nagios employee
Locked