Title: [opsview] [12517] Avoid a situation where Nagios would ignore freshness checks
- Revision
- 12517
- Author
- tvoon
- Date
- 2013-06-12 17:37:02 +0100 (Wed, 12 Jun 2013)
Log Message
Avoid a situation where Nagios would ignore freshness checks
Modified Paths
Modified: trunk/opsview-core/bin/nagconfgen.pl
===================================================================
--- trunk/opsview-core/bin/nagconfgen.pl 2013-06-12 16:18:34 UTC (rev 12516)
+++ trunk/opsview-core/bin/nagconfgen.pl 2013-06-12 16:37:02 UTC (rev 12517)
@@ -1144,6 +1144,15 @@
}
if ( defined $freshness_threshold_add ) {
+
+ # Nagios will ignore freshness_threshold==0 && check_interval==0
+ # as it is impossible to work out the actual value to use.
+ # Since we know the interval, we'll set that, which is all Nagios would
+ # do anyway
+ if ( $freshness_threshold_add == 0 ) {
+ $freshness_threshold_add = $check_interval;
+ }
+
print OUTFILE " check_freshness 1
freshness_threshold $freshness_threshold_add
";
_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins