1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Fix coding style.

This commit is contained in:
Hanson Wong 2017-06-27 10:17:16 +10:00 committed by GitHub
parent cbe99fd9fa
commit 8fd69c45f5

View file

@ -16,8 +16,8 @@ OpenWrt devices which have snmpd installed.
As a rule SNMP plugins need site specific configuration. The default As a rule SNMP plugins need site specific configuration. The default
configuration (shown here) will only work on insecure sites/devices. configuration (shown here) will only work on insecure sites/devices.
[snmp_*] [snmp_*]
env.version 2 env.version 2
env.community public env.community public
In general SNMP is not very secure at all unless you use SNMP version In general SNMP is not very secure at all unless you use SNMP version
@ -41,10 +41,6 @@ reports the contents of the hrStorageSize and hrStorageUsed OIDs.
#%# family=snmpauto #%# family=snmpauto
#%# capabilities=snmpconf #%# capabilities=snmpconf
=head1 VERSION
$Id$
=head1 BUGS =head1 BUGS
None known. None known.
@ -65,16 +61,16 @@ use strict;
use Munin::Plugin::SNMP; use Munin::Plugin::SNMP;
if (defined $ARGV[0] and $ARGV[0] eq 'snmpconf') { if (defined $ARGV[0] and $ARGV[0] eq 'snmpconf') {
print "require 1.3.6.1.2.1.25.2.3.1.5.1\n"; print "require 1.3.6.1.2.1.25.2.3.1.5.1\n";
print "require 1.3.6.1.2.1.25.2.3.1.6.1\n"; print "require 1.3.6.1.2.1.25.2.3.1.6.1\n";
exit 0; exit 0;
} }
if (defined $ARGV[0] and $ARGV[0] eq "config") { if (defined $ARGV[0] and $ARGV[0] eq "config") {
my ($host) = Munin::Plugin::SNMP->config_session(); my ($host) = Munin::Plugin::SNMP->config_session();
print "host_name $host\n" unless ($host eq 'localhost'); print "host_name $host\n" unless ($host eq 'localhost');
print <<'EOC'; print <<'EOC';
graph_title Memory usage graph_title Memory usage
graph_args --base 1000 -l 0 graph_args --base 1000 -l 0
graph_vlabel kB graph_vlabel kB
@ -87,7 +83,7 @@ memused.info The memory in use.
memsize.draw LINE1 memsize.draw LINE1
memused.draw LINE2 memused.draw LINE2
EOC EOC
exit 0; exit 0;
} }
my $session = Munin::Plugin::SNMP->session(); my $session = Munin::Plugin::SNMP->session();