Title: [opsview] [12274] Stop running MRTG checks on a reload when SNMP is not enabled
Revision
12274
Author
dferguson
Date
2013-05-13 17:20:53 +0100 (Mon, 13 May 2013)

Log Message

Stop running MRTG checks on a reload when SNMP is not enabled

This can otherwise occur when SNMP and MRTG was previously enabled, then SNMP disabled but db config shows MRTG still in use.

Modified Paths

Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2013-05-13 14:13:32 UTC (rev 12273)
+++ trunk/CHANGES	2013-05-13 16:20:53 UTC (rev 12274)
@@ -37,6 +37,7 @@
     Added missing notification macros: LASTHOSTDOWN, LASTHOSTCHECK, LASTHOSTUNREACHABLE, LASTHOSTUP, LASTSERVICECHECK, LASTSERVICEOK, LASTSERVICEWARNING, LASTSTATECHANGE
     Fixed attributes with numbers in the name when processing commands
     Redirected 'call_nmis' cronjob output to the existing nmis.log logfile
+    Stop running MRTG checks on a reload when SNMP is not enabled
 
 3.20130304
     ENHANCEMENTS:

Modified: trunk/opsview-core/bin/nagconfgen.pl
===================================================================
--- trunk/opsview-core/bin/nagconfgen.pl	2013-05-13 14:13:32 UTC (rev 12273)
+++ trunk/opsview-core/bin/nagconfgen.pl	2013-05-13 16:20:53 UTC (rev 12274)
@@ -508,7 +508,7 @@
 
         # Lookup and cache host IP's for checking potential
         # MRTG configuration errors
-        if ( $host->use_mrtg ) {
+        if ( $host->use_mrtg && $host->enable_snmp ) {
             my $hostips;
             if ( exists $seen{$hostid} ) {
                 $hostips = $seen{$hostid};

_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to