icinga
configurationservermonitoringicinga-nagios-fork

icinga is a promising fork of the popular nagios monitoring tool. As such it helps to keep track, which of your hosts are up and running and which need administration, e.g. system updates. All that is presented in a fancy web ui:

icinga screenshot

Configuration #

The configuration wasn't enjoyable, even though it was not as bad as with nagios. Theoretically should all nagios plugins work with icinga. However I found, that the asterisk monitoring did not. For that reason I kind-of reverse engineered the SIP/VOIP protocol in order to find a suitable and generic test pattern.

  object Host "typesafe.de" {
    import "defaulthost"
    address  = "typesafe.de"
    address6 = "typesafe.de"
  
    /* Define http vhost attributes for service apply rules in `services.conf`. */
    vars.http_vhosts["http"] = {
      http_uri = "/" 
    }
  }

  object Service "dns.test" {
    host_name = "typesafe.de"
    check_command   = "dig"
    vars.dig_server = "ns1.typesafe.de"
    vars.dig_lookup = "dyndnstest.typesafe.de"
  }


  object HostGroup "entwicklerseite" {
    display_name = "Entwicklerseite"
  }

  object Host "entwicklerseite.de" {
    import "defaulthost"
    groups         += [ "entwicklerseite" ]
    address         = "entwicklerseite.de"
    address6        = "entwicklerseite.de"
    vars.http_vhost = "entwicklerseite.de"
    vars.http_uri   = "/"
  }

  object Service "http://blog.entwicklerseite.de/" {
    host_name       = "entwicklerseite.de"
    vars.http_vhost = "blog.entwicklerseite.de"
    check_command   = "http"
  }


  # most complicated example, which I figured out by myown:
object Service "asterisk" {
  import "generic-service"
  host_name             = "entwicklerseite.de"
  vars.udp_address      = "10.0.0.5"
  vars.udp_port         = 5060
  vars.udp_send         = {{{OPTIONS sip:4912345678@example.com SIP/2.0
Accept: application/sdp
To: sip:+4917612345678@10.0.0.5
From: <sip:monitor@entwicklerseite>;tag=55a66b
CSeq: 1 OPTIONS
Call-ID: max@example.com
Max-Forwards: 1
Via: SIP/2.0/UDP 10.0.0.5
}}}
  vars.udp_expect       = ""
  check_command         = "udp"

}

Notice The 10.0.0.5 in the "asterisk" example needs to be replaced by the IP of the SIP service to monitor, usually listening on port 5060. It will work for any VOIP connection, not just with asterisk.

top