contrib/snmp-probe-host.px: Don't fail silently, but outupt an empty config.
authorFlorian Forster <octo@noris.net>
Tue, 26 Aug 2008 15:59:18 +0000 (17:59 +0200)
committerFlorian Forster <octo@noris.net>
Tue, 26 Aug 2008 15:59:18 +0000 (17:59 +0200)
contrib/snmp-probe-host.px

index 1cfaa07..1d8f975 100755 (executable)
@@ -224,11 +224,6 @@ sub probe_all
     $version--;
   } # while ($version > 0)
 
-  if (!@valid_data)
-  {
-    return;
-  }
-
   print <<EOF;
   <Host "$host">
     Address "$address"
@@ -239,6 +234,14 @@ EOF
   {
     print "    Collect \"$_\"\n";
   }
+  if (!@valid_data)
+  {
+    print <<EOF;
+# WARNING: Autoconfiguration failed.
+# TODO: Add one or more `Collect' statements here:
+#   Collect "foo"
+EOF
+  }
   print <<EOF;
     Interval 60
   </Host>