Icinga Service Availability

Dashboard

Historic Service Status for each of your Icinga2 monitored Services.
Last updated: a year ago

Downloads: 594

Reviews: 0

    This dashboard uses data collected in Icinga2 and stored in a MySQL or MariaDB database. It shows the historic status of all services. Pick your host, then your service from the variable drop down boxes. It shows, point in time status, check execution time, pie chart showing percentage over time for each status and a table of check results for cross referencing against the status graph.

    Collector Configuration Details

    You need your Icinga2 service to write service check status to your database. In /etc/icinga2/features-available/ido-mysql.conf:

    object IdoMysqlConnection "ido-mysql" {
      user = "<icinga_user>",
      password = "<password>",
      host = "localhost",
      database = "<icingadb>"
      categories = [ "DbCatConfig", "DbCatState", "DbCatAcknowledgement", "DbCatComment", "DbCatDowntime", "DbCatEventHandler", "DbCatFlapping", "DbCatCheck", "DbCatNotification", "DbCatProgramStatus", "DbCatRetention", "DbCatStateHistory" ]
    }
    

    If you are not already storing icinga data in a database then set one up and run the following to enable it:

    icinga2 feature enable ido-mysql
    

    You will also need a table in your database that maps Icinga status values to status names (0 - OK, 1 - WARNING, 2 - CRITICAL, 3 - UNKNOWN). The following sql will create it for you:

    CREATE TABLE statusmap (state int(11) NOT NULL,statstring varchar(10) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
    INSERT INTO statusmap (state, statstring) VALUES(0, 'OK'),(1, 'WARNING'),(2, 'CRITICAL'),(3, 'UNKNOWN');
    

    Create a grafana user in your icinga database that has select privileges only on icinga_objects, icinga_service_checks and statusmap. Use this user to login to your datasource.