{"id":703,"date":"2011-06-12T19:19:00","date_gmt":"2011-06-12T19:19:00","guid":{"rendered":"https:\/\/www.geekmungus.co.uk\/?p=703"},"modified":"2022-11-05T10:53:43","modified_gmt":"2022-11-05T10:53:43","slug":"nagios-example-using-check_icmp","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=703","title":{"rendered":"Nagios &#8211; Example using check_icmp"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is what would be needed in your hosts configuration to monitor using check_icmp rather than check_ping.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define service{\n\nuse                     generic-service ; Inherit values from a template\n\nhost_name               SWITCH    ; The name of the host the service is associated with\n\nservice_description     PING            ; The service description\n\ncheck_command           check_icmp!40.0,10%!100.0,40%  ; The command used to monitor the service\n\nnormal_check_interval   5               ; Check the service every 5 minutes under normal conditions\n\nretry_check_interval    1               ; Re-check the service every minute until its final\/hard state is determined\n\n}\n\nThis is what would be needed in the commands.cfg\n\n# 'check-host-alive' command definition\n\ndefine command{\n\ncommand_name    check_icmp\n\ncommand_line    $USER1$\/check_icmp -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 2\n\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This makes the assumption its going to do two pings, otherwise turn &#8220;-p 2&#8221; into $ARG3$ instead!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is what would be needed in your hosts configuration to monitor using check_icmp rather than check_ping. This makes the assumption its going to do two pings, otherwise turn &#8220;-p 2&#8221; into $ARG3$ instead!<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,16],"tags":[],"class_list":["post-703","post","type-post","status-publish","format-standard","hentry","category-linux","category-nagios-and-nagiosxi"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=703"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":1573,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions\/1573"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}