Problems monitoring check https

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
tmeto
Posts: 26
Joined: Tue Aug 20, 2013 4:59 am

Problems monitoring check https

Post 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!!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Problems monitoring check https

Post 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.
Former Nagios Employee
tmeto
Posts: 26
Joined: Tue Aug 20, 2013 4:59 am

Re: Problems monitoring check https

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Problems monitoring check https

Post 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.
Former Nagios Employee
Locked