Flexible downtime

  • Hello icinga2 folk,


    today I tested the flexible downtimes.

    I created via API a downtime at 14pm to 14:10pm and a duration with 30 minutes.

    In this timerange (14pm to 14:10pm) I shut down my host. The server runs directly into the maintanance status for 30 minutes. But at 14:10 pm the server runs out from maintanance status.


    My question is:

    Did I understand this feature right? I thought, when I create a timerange and the checks turns into the status "NOT OK" in this timerange, the server will be in maintanance mode for the duration which I set.


    My knowledge about flexible downtimes comes from this site: https://docs.icinga.com/icinga…advanced-topics#downtimes


    I used the following API command (I changed for you the unix timestamps into the normal time):

    Code
    1. curl -k -s -u api_user:********* -H 'Accept: application/json' -X POST 'https://monitoring.masterserver.example.com:5665/v1/actions/schedule-downtime?type=Host&filter=host.name==%22my_test_server.example.com%22' -d '{ "start_time": 14pm, "end_time": 14:10pm , "fixed": false, "duration": 30minutes, "author": "agile", "comment": "Instance stopped from Agility" }' | python -m json.tool


    Cheers,

    Morde

  • You understood it correctly.

    Did you try it with other values too?

    Maybe try different time formats and durations to see if that changes something.

    maybe dnsmichi can shed some light on this?

    Linux is dead, long live Linux


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

  • My question is:

    Did I understand this feature right? I thought, when I create a timerange and the checks turns into the status "NOT OK" in this timerange, the server will be in maintanance mode for the duration which I set.

    This behaviour sounds like a bug (compared to the description in Icinga1 ["The downtime will then last for the duration you specified, even if the host or service recovers before the downtime expires."]).

  • Hello Michi,


    at this icinga 2 enviroment we use the following version:

  • Ok, thanks, strange. Can you extract the downtime from /v1/objects/downtimes via GET, and collect all that info into a GitHub issue (including the steps to reproduce and so on, an issue template will greet you)? That could be a bug.