Title: [opsview] [10060] Added resilience to snmp host interfaces default where the default threshold
- Revision
- 10060
- Author
- tvoon
- Date
- 2012-09-13 22:28:31 +0100 (Thu, 13 Sep 2012)
Log Message
Added resilience to snmp host interfaces default where the default threshold
row is missing
Modified Paths
Modified: trunk/opsview-core/bin/nagconfgen.pl
===================================================================
--- trunk/opsview-core/bin/nagconfgen.pl 2012-09-13 16:51:32 UTC (rev 10059)
+++ trunk/opsview-core/bin/nagconfgen.pl 2012-09-13 21:28:31 UTC (rev 10060)
@@ -351,6 +351,13 @@
my $default_thresholds =
$host->snmpinterfaces( { interfacename => "" } )->first;
+ # If default row does not exist, then warn for UI and move on
+ unless ($default_thresholds) {
+ warn( "No default row for SNMP interfaces for host name: "
+ . $host->name );
+ next;
+ }
+
foreach my $int (@interfaces) {
next unless $int->active;
_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins