How to check Host is up with Nagios for servers with disabled ICMP (ping) protocol

Friday, 15th July 2011

Reading Time: 2minutes
At the company where I administrate some servers, they’re running Nagios to keep track of the servers status and instantly report if problems with connectivity to certain servers occurs.

Now one of the servers which had configured UP host checks is up, but because of heavy ICMP denial of service attacks to the servers the ICMP protocol ping is completely disabled.

In Nagios this host was constantly showing as DOWN in the usual red color, so nagios reported issue even though all services on the client are running fine.

As this is quite annoying, I checked if Nagios supports host checking without doing the ICMP ping test. It appeared it does through something called in nagios Submit passive check result for host

Enabling the “Submit passive check result for this host” could be done straight from Nagios’s web interface (so I don’t even have to edit configurations! ;).
Here is how I did it. In Nagios I had to navigate to:

Hosts -> Click over my host (hosting1) which showed in red as down

Nagios disable ICMP ping report for hosts

You see my down host which I clicked over showing in red in above pic.

On next Nagios screen I had to select, Disable active checks of this host

Nagios Disable active ICMP checks of this host
and press on the Commit button.

Next following text appears on browser:

Your command request was successfully submitted to Nagios for processing.

Note: It may take a while before the command is actually processed.

Afterwards I had to click on Submit passive check result for this host and in:
Check Output to type in:

check_tcp -p 80

Here is the Screenshot of the Command Options dialog:

Nagios submit passive check with check TCP -p 80

That’s all now Nagious should start checking the down host by doing a query if the webserver on port 80 is up and running instead of pinging it.
As well as the server is no longer shown in the Nagio’s Down host list.

Share this on:

Download PDFDownload PDF

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

6 Responses to “How to check Host is up with Nagios for servers with disabled ICMP (ping) protocol”

  1. Faizsays:
    Firefox 12.0 Firefox 12.0 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0

    Hi,
    Do you have any idea how to do this on multiple host let say for 100 hosts? Do I have to do it manually 1-by-1?

    View CommentView Comment
    • adminsays:
      Opera 11.00 Opera 11.00 GNU/Linux x64 GNU/Linux x64
      Opera/9.80 (X11; Linux x86_64; U; bg) Presto/2.7.62 Version/11.00

      Hi,

      Maybe you can check what kind of config is generated while clicked on to one of the unreachable hosts?
      Those conf might contain something concerning the disabled host you might take and later use some shell script to generate same config variables and place them in config?

      View CommentView Comment
      • Faizsays:
        Firefox 12.0 Firefox 12.0 Windows 7 x64 Edition Windows 7 x64 Edition
        Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0

        Hi,

        Thanks for your advice. I managed to do this by putting these host into one hostgroup and then I’ve assigned host check to that hostgroup to active check it using check_tcp on port 443 (I use SSL). In this way you can do it for a larger deployment and the same time get the benefit of active check.

        View CommentView Comment
  2. Google Chrome 20.0.1132.57 Google Chrome 20.0.1132.57 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

    Falai ai galera!!!!

    Define a dummy service for SUCCESS

    # Dummy SUCCESS command, used for host we no means of checking
    define command{
    command_name SUCCESS
    command_line $USER1$/check_dummy 0
    }

    Then in your host definition, use

    check_command SUCCESS

    The host will then be presumed to be up, so the service will be checked.

    Simples like that!!!! Simples assim!!! Sou fã do nagios!!

    View CommentView Comment
  3. آموزش میکس و مسترینگsays:
    Safari 11.0.2 Safari 11.0.2 Mac OS X 10.11.6 Mac OS X 10.11.6
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0.2 Safari/604.4.7

    Hi, this weekend is good in favor of me, as this moment i am reading this wonderful informative paragraph here at my residence.

    آموزش میکس و مسترینگ recently posted…آموزش میکس و مسترینگMy Profile

    View CommentView Comment
  4. materialisticbysays:
    Google Chrome 59.0.3071.115 Google Chrome 59.0.3071.115 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

    капельницы из запоя в домашних условиях

    materialisticby recently posted…inconclusivedevMy Profile

    View CommentView Comment

Leave a Reply

CommentLuv badge