Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all downtime for a host via API #1424

Open
Brickius opened this issue Feb 6, 2025 · 1 comment
Open

Remove all downtime for a host via API #1424

Brickius opened this issue Feb 6, 2025 · 1 comment

Comments

@Brickius
Copy link

Brickius commented Feb 6, 2025

Im trying to remove all downtime for a host + its services via the API

I can remove host ok:

/hosts/HOSTNAME/cmd/del_active_host_downtimes

But for services I cant figure out how to specify "all" i.e. I can do it one by one by pulling the list of services but its not a very efficent way of doing it

/services/HOSTNAME/*/cmd/del_active_service_downtimes"

I cant seem to get the filter here to recognise regex:

"message" : "cannot send command, affected backend list is empty. no object found by filter: host=HOSTNAME service=*"
or
"message" : "cannot send command, affected backend list is empty. no object found by filter: host=HOSTNAME service=.*"

I can do it with the system command:

/system/cmd/del_downtime_by_host_name" -d "hostname=HOSTNAME"

But I dont really want to give this user that level of power

@sni
Copy link
Owner

sni commented Feb 10, 2025

Instead of pulling the list of services, i would pull the list of downtimes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants