CheckMK API: Modify downtime

Hi
i am using checkmk enterprise version 2.1.0p9.

I need to modify downtimes using the API interface, but there are only options for create, delete and view downtimes.
How can a modify a downtime using the API?

I already tried ‘PUT /objects/downtime/ID’, but the http method “PUT” is not supported for this endpoint.

Thanks for help!

Just create a new scheduled downtime and remove the old one?

Multiple overlapping scheduled downtimes are allowed.

Thanks for reply!

My next problem:
The CheckMK Downtime API “/domain-types/downtime/collections/all” is not returning the service_name, only the host_name:

{
      "domainType": "downtime",
      "id": "54034",
      "title": "Downtime for service: XXX",
      "members": {},
      "extensions": {
        "site_id": "SITENAME",
        "host_name": "HOSTNAME",
        "author": "USERNAME",
        "is_service": "yes",
        "start_time": "2024-01-10T12:24:59+00:00",
        "end_time": "2024-03-10T14:24:59+00:00",
        "recurring": "no",
        "comment": "ack"
      }
}

The keyword “service_name” is missing…

A service_name attribute also not mentioned in the REST API documentation.

Looks like another bug, @MarsellusWallace .

Hi @tmanninger and @r.sander,

I’ll create an internal ticket for this:

  • “service_description” should be returned (why should it be “service_name”?)
    ** BTW: did you see the service description is shown in the returned “title”?
  • “modify downtime” is missing - while there’s the workaround to “add a new and remove the old one”

BR,
Marsellus W.

2 Likes

But that contains more than just the service description.

I know, @r.sander, it just was a recognition.

But do you agree that the missing information should be called “service_description” instead of “service_name”?

Yes, it’s the traditional name.

Hi,

thanks for feedback!
Is there a way prioritize the “modify downtime” functionallity. I really need this feature :slight_smile:

Regards,
Thomas

I do my best getting this prioritized, but without a customer ticket I cannot do more than reporting it…

Until then you can at least parse the service description from the shown “title” :wink:

Oh, wait a minute, “modify downtimes” would be a feature request and WILL last (maybe A LOT) longer. My last comment was for the missing “service_description”.

Moin @tmanninger and @r.sander,

  1. service_description will get shown in service_downtimes starting from 2.2.0p23: downtimes: Added service_description field to services downtimes
  2. the colleagues work on adding a modify downtime API endpoint, I expect this to arrive with 2.3.0, maybe backported to 2.2.0…

Have a nice day!
BR,
Marsellus W.

3 Likes

Thank’s for the good news :slight_smile:

Hi,

is there a release date available for checkmk 2.3?

Hi @tmanninger !

Take a look at this post: Join us for Checkmk 2.3 Beta Testing!
to learn how you can help us release Checkmk 2.3 faster :wink:

2 Likes

But the 2.3 changelog currently does not include the “modify downtime” request :slight_smile:

It’s not finished yet :wink:

1 Like