check_https not working...
Posted: Thu Jun 14, 2012 11:50 am
Hey Everyone,
I am trying to monitor the HTTPS site on my Barracuda spam/virus firewall. I am getting this error:
(Return code of 127 is out of bounds - plugin may be missing)
The device is on the internal network same as the Nagios server. My ping check for this hosts has no problems working. Once I created the check_https plugin in /usr/local/nagios/libexec/ I then recompiled the plugins. I have verified permissions and ownership of the check_https plugin I installed. It is the same as the check_http plugin.
-rwxr-xr-x 1 nagios nagios 417 Jun 14 10:59 check_https
The check_https file looks like:
#!/bin/bash
wget='/usr/bin/wget --no-check-certificate --output-document=/tmp/tmp_html -S'
add_uri='https://'
end_uri='/'
PORT=''
if [ $# -gt 1 ]
then
PORT=:$2
fi
if ($wget $add_uri$1$PORT$end_uri$3 2> /tmp/tmp_rep) then
cat /tmp/tmp_rep | grep "HTTP/1"
rm /tmp/tmp_rep
rm /tmp/tmp_html
exit 0
else
cat /tmp/tmp_rep | grep "HTTP/1" || echo 'Connection refused by host'
rm /tmp/tmp_rep
rm /tmp/tmp_html
exit 2
fi;
The commands.cfg file looks like this when referring to the plugin:
# 'check_https' command definition
define command{
command_name check_https
command_line $USER1$/check_https $ARG1$
}
The localhost.cfg file looks like this:
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name Cuda2
alias Outbound Cuda
address 192.168.x.x (obviously the real file doesn't have 'X's in the IP address field.)
}
define service{
use local-service ; Name of service template to use
host_name Cuda2
service_description HTTPS
check_command check_https
notifications_enabled 1
}
Any clues out there what I am missing. I am fairly new to really getting to put forth the effort to use Nagios. So far everything I have done has worked no problem and I love it. Just have to figure this out.
Thanks in advance for any and all help!
I am trying to monitor the HTTPS site on my Barracuda spam/virus firewall. I am getting this error:
(Return code of 127 is out of bounds - plugin may be missing)
The device is on the internal network same as the Nagios server. My ping check for this hosts has no problems working. Once I created the check_https plugin in /usr/local/nagios/libexec/ I then recompiled the plugins. I have verified permissions and ownership of the check_https plugin I installed. It is the same as the check_http plugin.
-rwxr-xr-x 1 nagios nagios 417 Jun 14 10:59 check_https
The check_https file looks like:
#!/bin/bash
wget='/usr/bin/wget --no-check-certificate --output-document=/tmp/tmp_html -S'
add_uri='https://'
end_uri='/'
PORT=''
if [ $# -gt 1 ]
then
PORT=:$2
fi
if ($wget $add_uri$1$PORT$end_uri$3 2> /tmp/tmp_rep) then
cat /tmp/tmp_rep | grep "HTTP/1"
rm /tmp/tmp_rep
rm /tmp/tmp_html
exit 0
else
cat /tmp/tmp_rep | grep "HTTP/1" || echo 'Connection refused by host'
rm /tmp/tmp_rep
rm /tmp/tmp_html
exit 2
fi;
The commands.cfg file looks like this when referring to the plugin:
# 'check_https' command definition
define command{
command_name check_https
command_line $USER1$/check_https $ARG1$
}
The localhost.cfg file looks like this:
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name Cuda2
alias Outbound Cuda
address 192.168.x.x (obviously the real file doesn't have 'X's in the IP address field.)
}
define service{
use local-service ; Name of service template to use
host_name Cuda2
service_description HTTPS
check_command check_https
notifications_enabled 1
}
Any clues out there what I am missing. I am fairly new to really getting to put forth the effort to use Nagios. So far everything I have done has worked no problem and I love it. Just have to figure this out.
Thanks in advance for any and all help!