Detects apply rules that suddenly stop matching after an Icinga Director
deployment. The plugin compares the two most recent startup.log files and
only reports warnings that are new to the latest stage – pre-existing
warnings are ignored.
Requires Python 3.6+ and read access to
/var/lib/icinga2/api/packages/director/*/startup.log.
cp check_director_startup_warnings /usr/lib/nagios/plugins/
chmod 755 /usr/lib/nagios/plugins/check_director_startup_warnings| Option | Default | Description |
|---|---|---|
-p, --pattern |
/var/lib/icinga2/api/packages/director/*/startup.log |
Glob pattern for the startup.log files to compare |
-m, --max-lines |
10 |
Maximum number of new warnings to show in the output |
-C, --critical |
off | Return CRITICAL instead of WARNING when new warnings are found |
$ check_director_startup_warnings
OK - no new warnings (newer=abc123... older=def456...) |new_warnings=0;1;;0 ...
$ check_director_startup_warnings -C
CRITICAL - 2 new warning(s) in abc123... |new_warnings=2;;1;0 ...
Comparing:
newer: /var/lib/icinga2/api/packages/director/abc123.../startup.log
older: /var/lib/icinga2/api/packages/director/def456.../startup.log
warning/config: Apply rule 'ping' for type 'Service' does not match ...
| Metric | Description |
|---|---|
new_warnings |
New warnings in the latest stage (warn or crit threshold at 1, depending on -C) |
total_warnings |
Total warnings in the newer stage |
The config/ directory contains two ready-to-use CheckCommand definitions:
director_basket.json– import via Icinga Director → Configuration → Baskets → Uploaddirector_startup_warnings_command.conf– DSL definition for use without Director