tmanninger
(Tmanninger)
February 13, 2024, 12:09pm
1
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!
r.sander
(Robert Sander)
February 13, 2024, 12:37pm
2
Just create a new scheduled downtime and remove the old one?
Multiple overlapping scheduled downtimes are allowed.
tmanninger
(Tmanninger)
February 13, 2024, 12:58pm
3
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…
r.sander
(Robert Sander)
February 13, 2024, 1:13pm
4
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
r.sander
(Robert Sander)
February 15, 2024, 7:54am
6
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”?
r.sander
(Robert Sander)
February 15, 2024, 8:39am
8
Yes, it’s the traditional name.
tmanninger
(Tmanninger)
February 15, 2024, 11:59am
9
MarsellusWallace:
“modify downtime” is missing - while there’s the workaround to “add a new and remove the old one”
Hi,
thanks for feedback!
Is there a way prioritize the “modify downtime” functionallity. I really need this feature …
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”
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 ,
service_description will get shown in service_downtimes starting from 2.2.0p23: downtimes: Added service_description field to services downtimes
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
tmanninger
(Tmanninger)
February 27, 2024, 6:37am
13
Thank’s for the good news
Hi,
is there a release date available for checkmk 2.3?
Sara
March 6, 2024, 12:32pm
15
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
2 Likes
But the 2.3 changelog currently does not include the “modify downtime” request …