Staging instance, all changes can be removed at any time

Skip to content

icinga2: Use the dummy host checker for "virtual" or http-only hosts

Some of these hosts don't ping, and some of them are virtual, so we should use the dummy checker (https://icinga.com/docs/icinga-2/latest/doc/03-monitoring-basics/#host-check-alternatives) instead

Test Plan

octocatalog-diff on pergamon:

*** Running octocatalog-diff on host pergamon.softwareheritage.org
I, [2020-12-04T11:08:41.156632 #23541]  INFO -- : Catalogs compiled for pergamon.softwareheritage.org
I, [2020-12-04T11:08:42.245902 #23541]  INFO -- : Diffs computed for pergamon.softwareheritage.org
diff origin/production/pergamon.softwareheritage.org current/pergamon.softwareheritage.org
*******************************************
  Concat::Fragment[icinga2::object::Host::DNS resolvers] =>
   parameters =>
     content =>
      @@ -2,4 +2,6 @@
       object Host "DNS resolvers" {
         address = "127.0.0.1"
      -  check_command = "hostalive4"
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "virtual host for clustered checks"
       }
*******************************************
  Concat::Fragment[icinga2::object::Host::softwareheritage.org] =>
   parameters =>
     content =>
      @@ -4,6 +4,6 @@
      _
         address = "softwareheritage.org"
      -  check_command = "hostalive4"
      -  vars.ping_wrta = 150
      -  vars.ping_crta = 300
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "HTTP-only host"
       }
*******************************************
  Concat::Fragment[icinga2::object::Host::swh-logging-prod] =>
   parameters =>
     content =>
      @@ -2,4 +2,6 @@
       object Host "swh-logging-prod" {
         address = "127.0.0.1"
      -  check_command = "hostalive4"
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "virtual host for clustered checks"
       }
*******************************************
  Concat::Fragment[icinga2::object::Host::www.softwareheritage.org] =>
   parameters =>
     content =>
      @@ -4,6 +4,6 @@
      _
         address = "www.softwareheritage.org"
      -  check_command = "hostalive4"
      -  vars.ping_wrta = 150
      -  vars.ping_crta = 300
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "HTTP-only host"
       }
*******************************************
  Concat_fragment[icinga2::object::Host::DNS resolvers] =>
   parameters =>
     content =>
      @@ -2,4 +2,6 @@
       object Host "DNS resolvers" {
         address = "127.0.0.1"
      -  check_command = "hostalive4"
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "virtual host for clustered checks"
       }
*******************************************
  Concat_fragment[icinga2::object::Host::softwareheritage.org] =>
   parameters =>
     content =>
      @@ -4,6 +4,6 @@
      _
         address = "softwareheritage.org"
      -  check_command = "hostalive4"
      -  vars.ping_wrta = 150
      -  vars.ping_crta = 300
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "HTTP-only host"
       }
*******************************************
  Concat_fragment[icinga2::object::Host::swh-logging-prod] =>
   parameters =>
     content =>
      @@ -2,4 +2,6 @@
       object Host "swh-logging-prod" {
         address = "127.0.0.1"
      -  check_command = "hostalive4"
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "virtual host for clustered checks"
       }
*******************************************
  Concat_fragment[icinga2::object::Host::www.softwareheritage.org] =>
   parameters =>
     content =>
      @@ -4,6 +4,6 @@
      _
         address = "www.softwareheritage.org"
      -  check_command = "hostalive4"
      -  vars.ping_wrta = 150
      -  vars.ping_crta = 300
      +  check_command = "dummy"
      +  vars.dummy_state = 0
      +  vars.dummy_text = "HTTP-only host"
       }
*******************************************
  Icinga2::Object::Host[DNS resolvers] =>
   parameters =>
     check_command =>
      - hostalive4
      + dummy
     vars =>
      + {"dummy_state"=>0, "dummy_text"=>"virtual host for clustered checks"}
*******************************************
  Icinga2::Object::Host[softwareheritage.org] =>
   parameters =>
     check_command =>
      - hostalive4
      + dummy
     vars =>
       dummy_state =>
        + 0
       dummy_text =>
        + HTTP-only host
       ping_crta =>
        - 300
       ping_wrta =>
        - 150
*******************************************
  Icinga2::Object::Host[swh-logging-prod] =>
   parameters =>
     check_command =>
      - hostalive4
      + dummy
     vars =>
      + {"dummy_state"=>0, "dummy_text"=>"virtual host for clustered checks"}
*******************************************
  Icinga2::Object::Host[www.softwareheritage.org] =>
   parameters =>
     check_command =>
      - hostalive4
      + dummy
     vars =>
       dummy_state =>
        + 0
       dummy_text =>
        + HTTP-only host
       ping_crta =>
        - 300
       ping_wrta =>
        - 150
*******************************************
  Icinga2::Object[icinga2::object::Host::DNS resolvers] =>
   parameters =>
     attrs =>
       check_command =>
        - hostalive4
        + dummy
       vars =>
        + {"dummy_state"=>0, "dummy_text"=>"virtual host for clustered checks"}
*******************************************
  Icinga2::Object[icinga2::object::Host::softwareheritage.org] =>
   parameters =>
     attrs =>
       check_command =>
        - hostalive4
        + dummy
       vars =>
         dummy_state =>
          + 0
         dummy_text =>
          + HTTP-only host
         ping_crta =>
          - 300
         ping_wrta =>
          - 150
*******************************************
  Icinga2::Object[icinga2::object::Host::swh-logging-prod] =>
   parameters =>
     attrs =>
       check_command =>
        - hostalive4
        + dummy
       vars =>
        + {"dummy_state"=>0, "dummy_text"=>"virtual host for clustered checks"}
*******************************************
  Icinga2::Object[icinga2::object::Host::www.softwareheritage.org] =>
   parameters =>
     attrs =>
       check_command =>
        - hostalive4
        + dummy
       vars =>
         dummy_state =>
          + 0
         dummy_text =>
          + HTTP-only host
         ping_crta =>
          - 300
         ping_wrta =>
          - 150
*******************************************
*** End octocatalog-diff on pergamon.softwareheritage.org

Migrated from D4662 (view on Phabricator)

Merge request reports

Loading