Past downtime registration

This forum was archived to /woltlab and is now in read-only mode.
  • Hi all,


    Is there a way to register "historical" or past downtimes in Icinga2? We make a lot of reports for our customers. These are based on Icinga2, and we want to have those 100% correct. if a customer disconnects his line for local maintenance and we don't know about this until later, we have the need to register this as a downtime from the time the host went down until the host is back up again. Also, sometimes our engineers (not me :whistling: ) forget to add downtime to a specific host or service in a maintenance window, and we need to be able to set this after or during the job.


    When we try to add downtime in the past from Icingaweb2 we get this error: A downtime must not be in the past.


    We have tried adding downtimes using External Commands, but that fails in another way: If we set the downtime let's say between 5 am to 6 am this morning, it will start the downtime at 5 am, but the downtime will not end at 6 am - it will end after the command is run. If I run this command at 9:15 am, the downtime will end a couple of minutes after that, for example at 9:18 am.


    Is there a way to do this right? :)


    Icinga version: r2.6.0-1, Debian 8.6 (Jessie), 1 master and 6 satellite checkers

    The post was edited 1 time, last by kunsjef ().

  • easiest way would be to edit the DB directly, but I would advise against that.


    Best way would be to explain the lack of downtime windows to your customers and strenghten the communication.

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • I understand your needs - however from my point of view, that would turn every monitoring system as well as any logging device unrelyable. What should i think about a monitoring system that tells me there was a downtime when in fact - at least at the time of the event - it has not been there ?


    however, the below seems to set a downtime in the past:

    Code
    1. curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/actions/schedule-downtime?type=Service&filter=service.name==%22procs%22' -d '{ "start_time": 1482220000, "end_time": 1482223800, "duration": 1000, "author": "icingaadmin", "comment": "IPv4 network maintenance" }'
  • however, the below seems to set a downtime in the past:

    Code
    1. curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/actions/schedule-downtime?type=Service&filter=service.name==%22procs%22' -d '{ "start_time": 1482220000, "end_time": 1482223800, "duration": 1000, "author": "icingaadmin", "comment": "IPv4 network maintenance" }'

    I will definitely try this. Thanks a bunch! I didn't consider the API.

  • Unfortunately the API didn't work either. The downtime start is set correctly, but the end is still at the same time the command is run. Maybe this is a bug?


    This is still something I want to do, but I have no idea how without tinkering with the database.

  • Add the downtimes in your reports, not in Icinga 2 (or the IDO DB). Setting Downtimes in the past may work today but can break at any time with future updates.

  • ... and it really is not "in the spirit" of an event logging system to "change the facts later".