Page 1 of 1

check_procs MisConfiguration or UnExpected Result!

Posted: Wed Jul 16, 2014 10:28 am
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.

Re: check_procs MisConfiguration or UnExpected Result!

Posted: Wed Jul 16, 2014 10:32 am
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.