Our development cycles now last ~3 weeks, where we work on a defined feature set whilst fixing bugs and improving overall performance. This time, the new release comes with changes that may render previous configuration and state files invalid – please check the Changelog for details.
0.0.6 adds a new major feature to Icinga 2: Built-in ScheduledDowntime configuration objects can be used to set up recurring downtimes for services.
Imagine the following scenario: Your host will use a load service to check its performance at a regular interval. At night during backup, an increase in load may induce warning/critical check results and trigger alert notifications. While you can still schedule one downtime manually in advance or use external scripts and a cron job to schedule downtimes, it would be reasonable to plan your maintenance for a defined time range using a scheduled downtime.
Define a ScheduledDowntime template and set the time ranges, the author and the auto-generated comment:
template ScheduledDowntime "backup-downtime" { author = "icingaadmin", comment = "Scheduled downtime for backup", ranges = { monday = "02:00-03:00", tuesday = "02:00-03:00", wednesday = "02:00-03:00", thursday = "02:00-03:00", friday = "02:00-03:00", saturday = "02:00-03:00", sunday = "02:00-03:00" } }
Add a new entry “backup” as scheduled_downtimes entry in the service definition and use the previously defined template. This works in the same way as notification declarations.
object Host "localhost" inherits "linux-server" { services["load"] = { templates = [ "generic-service" ], check_command = "load", scheduled_downtimes["backup"] = { templates = [ "backup-downtime" ] } } }
Please note that only the first downtime is active within a given range and shown in the user interfaces.
Enjoy the new scheduled downtimes in Icinga 2! 🙂
Change Log
- Scheduled Downtimes as configuration object (also known as “Recurring Downtimes”).
- Log command arguments
- Performance improvements for the config compiler
- Config validation provides stats at the end
- icinga2-enable-feature lists already enabled features
- Add support for latency statistics to IcingaCheckTask
- Implement support for using custom attributes as macros
- StatusDataWriter update interval as config attribute
- Improve performance with fetching data for status.dat/objects.cache, DB IDO and Livestatus
- Livestatus History Table performance improvements
Changes
- Generated object names (host with services array) use an exclamation mark instead of a colon as seperator. State file objects with downtimes, comments, etc are invalid (unknown) for that reason.
- Script variables are set using ‘var’ and ‘const’ instead of the previous ‘set’ identifier
- ITL constants are now embedded in libicinga
- Removed the ConsoleLogger object and keep the default console log enabled until we daemonize