check_http issue

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
rg25
Posts: 3
Joined: Thu Dec 12, 2013 9:56 am

check_http issue

Post by rg25 »

I am running nagios 3.2.1 on debian squeeze. I am succesfully executing /usr/lib/nagios/plugins/check_http --ssl -H xxx.xxx.xx.xxx -I xxx.xxx.xx.xxx -N form machine that . However, when I used the same on the server, I get

HOST ALERT: ubsinventory;DOWN;HARD;1;PING CRITICAL - Packet loss = 100%


template.cfg

define host{
name server ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
notification_period 24x7 ; Send notification out at any time - day or night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
hostgroups servers ; Host groups that Windows servers should be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}

server.cfg

define host{
use server ; Inherit default values from a template
host_name ubsinventory ; The name we're giving to this host
alias Inventory Lookup and FTP ; A longer name associated with the host
address xxx.xxx.xx.xxx ; IP address of the host
}

define hostgroup{
hostgroup_name servers ; The name of the hostgroup
alias Servers ; Long name of the group
}



define service{
use generic-service
host_name ubsinventory
service_description Web Services
check_command check_https
}

Thanks in advance
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_http issue

Post by slansing »

I am succesfully executing /usr/lib/nagios/plugins/check_http --ssl -H xxx.xxx.xx.xxx -I xxx.xxx.xx.xxx -N form machine that . However, when I used the same on the server, I get
This does not make much sense, in which case is this plugin working and in which case is it not? What is the difference?
rg25
Posts: 3
Joined: Thu Dec 12, 2013 9:56 am

Re: check_http issue

Post by rg25 »

I didn't mention the topology

iis server =============== sonicwall firewall ============ WAN =============== cisco firewall ================== debian squeeze running nagios

From debian squeeze's command line I am successfully executing /usr/lib/nagios/plugins/check_http --ssl -H xxx.xxx.xx.xxx -I xxx.xxx.xx.xxx -N

However, from the same machine, based on the configuration the same command is not successful. I looked at debug and it appears nagios3 is trying to ping the machine. I am not sure why as all I want to do is check_http.
rg25
Posts: 3
Joined: Thu Dec 12, 2013 9:56 am

Re: check_http issue

Post by rg25 »

sorry for the bother.

I figured out the problem. It appears that nagios check the status of a host by default by pinging it. After changing the check command everything is working.
Locked