Opsview does not currently have the functionality to set recurring downtime within the product, but you may use a script to do this via the crontab.
Prerequisites
- Opsview support scripts must be installed on the orchestrator: Opsview - Install support scripts
- Ensure these are up-to-date: Opsview - Update support scripts
Files of interest
/opt/opsview/supportscripts/bin/recur_downtime
/opt/opsview/supportscripts/etc/recur_downtime.yml
.
Process
- Run the following command to create the necessary configuration file.
- importantly, the *.yml.in file must be preserved.
# cd /opt/opsview/supportscripts
# cp -p etc/recur_downtime.yml.in etc/recur_downtime.yml - Modify
/opt/opsview/supportscripts/etc/recure_downtime.yml
Make changes appropriately to this file including or excluding/removing references to the hostgroups or hosts section/lines. e.g. use the hostgroups section for setting downtime for a host group. Once completed, it may now be incorporated within the opsview crontab.
Note: If the Opsview UI is not using HTTPS please replace "https" in the url directive with "http".
Example
opsview:
url: http://localhost/
ssl_verify_hostname: 0
username: (please supply with opsview username)
password: (please supply with opsview password)
debug: 0
downtime:
- comment: Scheduled recurring downtime
frequency: 3rd Tuesday of every month
start_time: 22:00
duration: 4h
hostgroups:
- MyHostgroup
hosts:
- Host_1
- Host_2
-
Tags:
- Answerbot
- downtime
- recur downtime
- recur_dwontime
- exported_docs_10_05_24
Comments
0 comments
Please sign in to leave a comment.