]> git.michaelhowe.org Git - packages/m/munin-plugins-local.git/commitdiff
Fix bugs
authorMichael Howe <michael@michaelhowe.org>
Sat, 14 Sep 2013 17:49:40 +0000 (17:49 +0000)
committerMichael Howe <michael@michaelhowe.org>
Sat, 14 Sep 2013 17:49:40 +0000 (17:49 +0000)
debian/changelog
debian/control
plugins/snmp__sky_router_

index 9cabb83fb6d9c4eee2348510b190af1377fd5f88..efbb4b2f76e8284022e963ab9d3cb578de91141d 100644 (file)
@@ -1,4 +1,4 @@
-munin-plugins-local (0.8) UNRELEASED; urgency=low
+munin-plugins-local (0.8) unstable; urgency=low
 
   * Add snmp__sky_router_ for network clients and bandwidth usage 
 
index 6da35c134d8b37ae01d84eabfd9b4d5bc4407cbe..15e0aa0e1fc504a0b25b887a76bfcacc91070833 100644 (file)
@@ -10,7 +10,7 @@ Standards-Version: 3.9.3
 Package: munin-plugins-local
 Architecture: all
 Depends: munin-node, ${misc:Depends}
-Recommends: nvidia-smi, smartctl, libxml-fast-perl, libhtml-tree-perl
+Recommends: nvidia-smi, smartctl, libxml-fast-perl, libhtml-tree-perl, libwww-mechanize-perl
 Suggests: python
 Description: network-wide graphing framework (local plugins for node)
  Extra plugins for munin-node, for use on michaelhowe.org machines.
index 402f81596b5385d5eaef3e8da6206c951e84a3d4..16c7d2ce5cc99a77545a8b06c7cb98d53cf478d6 100755 (executable)
@@ -36,6 +36,8 @@ None currently available
 
 =head1 BUGS
 
+Using the 'rate' option will lock other administrators out of the device.
+
 =head1 AUTHORS
 
 Michael Howe
@@ -46,8 +48,7 @@ my $macre = $RE{net}{MAC};
 my $ipre = $RE{net}{IPv4};
 
 # All we care about is the host:
-#my ( $host ) = Munin::Plugin::SNMP->config_session();
-my $host = "192.168.5.1";
+my ( $host ) = Munin::Plugin::SNMP->config_session();
 
 my ( $verbose );
 GetOptions( "verbose"   => \$verbose );
@@ -58,10 +59,7 @@ my $pass = $ENV{password};
 # * Traffic rate
 # * Connected devices
 
-my $basename = $0;
-$basename =~ m{.*_[^_]+$};
-
-$basename = 'devices';
+my ( $basename ) = $0 =~ m{.*_([^_]+)$};
 
 my $config = ( defined $ARGV[0] and $ARGV[0] eq 'config' );
 
@@ -74,7 +72,7 @@ if( $basename eq 'rate' ){
 } elsif( $basename eq 'devices' ){
     get_devices();
 } else {
-    die "Incorrect option: '$basename'\n";
+    die "Incorrect suffix on $0: '$basename'\n";
 }
 
 sub get_rate {