Merge ~nagios-charmers/charm-nagios:flap-detection into ~nagios-charmers/charm-nagios:master
Status: | Merged |
---|---|
Approved by: | Joel Sing |
Approved revision: | 5792a7103af4b82a3e32b2940f9ba0a67a03c182 |
Merged at revision: | 8a7c28264766f48bec31bbfc7d83b2f1fe635304 |
Proposed branch: | ~nagios-charmers/charm-nagios:flap-detection |
Merge into: | ~nagios-charmers/charm-nagios:master |
Diff against target: |
53 lines (+12/-1) 3 files modified
config.yaml (+5/-0) hooks/templates/nagios-cfg.tmpl (+1/-1) hooks/upgrade-charm (+6/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joel Sing (community) | +1 | Approve | |
Canonical IS Reviewers | Pending | ||
Review via email: mp+375524@code.launchpad.net |
Commit message
Add flap detection configuration option.
This merge introduces a new configuration item "flap_detection".
It controls whether or not flap detection is enabled in Nagios. The default is true, which matches the present hard-coded default in the Nagios configuration template.
Additionally, I have added a function to the hooks library that will convert a python boolean type (which is returned by hookenv.config for a boolean type config item) into Nagios's preferred 0/1 integer representation for on/off states. This new setting uses the function, but I have not altered the behaviour of any existing settings and their rendering into the configuration file. It simply typecasts the boolean type as int, which achieves the desired result.
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.