Page 1 of 1

Problems monitoring check https

Posted: Thu May 05, 2016 11:13 am
by tmeto
We are trying to apply in Nagios the "check_snmp_proc.sh" script for to check https to the host 195.81.194.195:551 (this host is NATed to that port ), through linux command line it works correctly :

root @ snoc01debian01 : / usr / local / nagios / libexec # ./check_snmp_proc.sh 195.81.194.195:551 -C -H -N nagiosica apache2 -w 2 -C 0
OK : Process exist. Running instances : 6

But this check in the Nagios web interface does not work and generates the error " CRITICAL: Process snmpd does not exist "

(I Attache configuration of files hosts, services and commmands )


I need help. Thanks so much!!

Re: Problems monitoring check https

Posted: Thu May 05, 2016 11:21 am
by rkennedy
Can you show us how you have the command defined in Nagios?

Also, it looks like you're running the plugin as the root user, can you do su nagios and then try to run it? Let us know the full input / output.

Re: Problems monitoring check https

Posted: Fri May 06, 2016 1:49 am
by tmeto
Sorry! I forgot to attach the files. Just I attach .rar file containing screen dump of commands, host, service and error. Thanks so much!!
error_nagios.rar
(69.4 KiB) Downloaded 121 times

Re: Problems monitoring check https

Posted: Fri May 06, 2016 9:49 am
by rkennedy
Your command is defined as -

Code: Select all

$USER1$/check_snmp_proc.sh -H $HOSTADDRESS$ $ARG1$
and your service is defined -

Code: Select all

service_apache
$ARG1$ = :551 -C nagiosica -N apache2 -w 2 -c 0
which results in -

Code: Select all

$USER1$/check_snmp_proc.sh -H 195.81.194.195 :551 -C nagiosica -N apache2 -w 2 -c 0
This is a bit different then what you're running over the CLI -

Code: Select all

$USER1$/check_snmp_proc.sh 195.81.194.195:551 -C -H -N nagiosica apache2 -w 2 -C 0
You'd need to adjust the command accordingly, to match what you're running over the CLI.