-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add functionality to place agent in downtime #96
Comments
Hi do you mean to set downtimes via the API for hosts and services? |
Hi, curl -k -u user:password -H 'Accept: application/json' \
-X POST 'https://icinga.internal:5665/v1/actions/schedule-downtime' \
-d '{ "type": "Service", "filter": "host.name==\"server.internal\" && service.name==\"ping4\"", "start_time": 1592856490, "end_time": 1592866490, "all_services": true, "author": "ansible", "comment": "Patching!", "pretty": true }' Which works in ansible if you put all kinds of variables there but is not very elegant! It would be great if there were: - name: "Place agent into downtime"
icinga2_downtime:
host: {{ inventory_hostname }}
start: {{ some form of date and time }}
end: {{ some form of date and time }}
all_service: True/False
service: ping4
comment: "Patching"
type: flexible/fixed
child_hosts: None/triggered/non-triggered
when: XX
with_items: XX |
I've done something likes this in the past, maybe I can provide an additional module to handle downtimes. But I think it needs some rewriting. If can excerpt the module and provide it in an separate repository before adding it to the collection. |
Thanks for that link, Looks like you have done quite a bit! I spot a few todo's with the same subject: I guess a branch in this repo will do for the dev. of this module ? |
Thanks, I need to get myself updated on this module. But I remember that I had problems with removing downtimes, because the API call always removes all downtimes. I'll put this in a branch. |
Ah that is a good feature to be aware of, Looking forward to a branch to colab on! |
It would be great to add a feature where a host with all its services or just one service gets placed into downtime for X amount minutes.
This would be great for if the server is not ready yet with all its services while its being setup causing alerts / pages.
Also great for patching or other events that ansible will do with certain services that are monitored like upgrading said service.
The text was updated successfully, but these errors were encountered: