Skip to content

NETWAYS/check_director_startup_warnings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

check_director_startup_warnings

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.

Installation

cp check_director_startup_warnings /usr/lib/nagios/plugins/
chmod 755 /usr/lib/nagios/plugins/check_director_startup_warnings

Options

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

Examples

$ 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 ...

Performance Data

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

Configuration

The config/ directory contains two ready-to-use CheckCommand definitions:

  • director_basket.json – import via Icinga Director → Configuration → Baskets → Upload
  • director_startup_warnings_command.conf – DSL definition for use without Director

About

compare the two most recent Director startup.log files and report warnings that appear in the newer one but not in the older one

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages