facebooktwitterskypeRSS Feed
telephone: (920) 215-1842
facsimile: (866) 456-2115

Check Host without Ping

Nagios Ping Warning

There are many good reasons to disable ping on a server. Typically I disable ping (ICMP) on my servers and add a iptables entry to allow the nagios monitoring service complete access to monitor the system.

It is a good idea to disable ping since generally someone could use it to sniff out your open ports and find possible vulnerabilities.

Overview

As of this post I am running Nagios 3.2.0. Occasionally you might be checking a host that has ping (ICMP) disabled or just doesn’t respond to ping requests. As you can see from the image below because the ping response is blocked and Nagios reports an issue even though all services on the client are running prefectly. It just can’t ping it! Nagios Ping Warning



Solution

Submitting a passive check result can be done via the Web Interface (among other ways) so you just need to login to Nagios, select the host in question and use the “Submit passive check result for this host” command option from the list of Host Commands.

Nagios Passive Check

  check_tcp -p 80
  

 

Nagios Ping Warning Now you have the ability to check a host that has PING response disabled while displaying the correct state status. All services check will continue as normal but now you can display the up or down status

 

Related posts:

  1. How to whitelist hosts / IP addresses in Postfix
  2. Nagios – Server And Network Monitoring
  3. How can I check my email?

1 Comment to Check Host without Ping

  1. loyd's Gravatar loyd
    Tuesday, August 17, 2010 at 7:48 am | Permalink

    That only updates the status once. This template lets you define a host that only uses the web check to determine if the host is alive.
    # Generic host definition template – This is NOT a real host, just a template!

    define host{
    name generic-noping-webhost ; The name of this host template
    notifications_enabled 1 ; Host notifications are enabled
    event_handler_enabled 1 ; Host event handler is enabled
    flap_detection_enabled 1 ; Flap detection is enabled
    failure_prediction_enabled 1 ; Failure prediction is enabled
    process_perf_data 1 ; Process performance data
    retain_status_information 1 ; Retain status information across program restarts
    retain_nonstatus_information 1 ; Retain non-status information across program restarts
    check_command ‘check_tcp -p 80′
    max_check_attempts 10
    notification_interval 0
    notification_period 24×7
    notification_options d,u,r
    contact_groups admins
    register 0 ; DONT REGISTER THIS DEFINITION – ITS NOT A REAL HOST, JUST A TEMPLATE!
    }

Leave a Reply