Changeset 295

Show
Ignore:
Timestamp:
09/04/04 00:56:51 (8 years ago)
Author:
jimmyo
Message:

Added support for SNMP probing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    • Property cvs2svn:cvs-rev changed from 1.128 to 1.129
    r291 r295  
    77  * Small layout improvements. 
    88  * Added new options "graph_height" and "graph_width", to beter control size. 
     9  * Added support for SNMP probing. 
    910   
    1011munin (1.1.3) 
  • trunk/Makefile

    • Property cvs2svn:cvs-rev changed from 1.19 to 1.20
    r289 r295  
    6565        $(INSTALL) -m 0755 build/node/munin-node $(SBINDIR)/ 
    6666        $(INSTALL) -m 0755 build/node/munin-node-configure $(SBINDIR)/ 
     67        $(INSTALL) -m 0755 build/node/munin-node-configure-snmp $(SBINDIR)/ 
    6768        test -f "$(CONFDIR)/munin-node.conf" || $(INSTALL) -m 0644 build/node/munin-node.conf $(CONFDIR)/ 
    6869        $(INSTALL) -m 0755 build/node/munin-run $(SBINDIR)/ 
  • trunk/node/munin-node-configure.in

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r41 r295  
    44# 
    55# $Log$ 
     6# Revision 1.5  2004/09/03 22:56:51  jimmyo 
     7# Added support for SNMP probing. 
     8# 
    69# Revision 1.4  2004/01/29 19:25:52  jimmyo 
    710# Fixed bad debug output (forgotten linebreaks) in munin-node-configure (SF#882385). 
     
    5760my @dfamilies  = ("auto"); 
    5861my @families   = (); 
     62my @snmp       = (); 
     63my $snmpver    = undef; 
     64my $snmpcomm   = undef; 
    5965my $removes    = 0; 
    6066my $do_usage   = 0; 
     
    6470 
    6571$do_error = 1 unless GetOptions ( 
    66         "help"         => \$do_usage, 
    67         "shell!"       => \$shell, 
    68         "debug!"       => \$debug, 
    69         "suggest!"     => \$suggest, 
    70         "config=s"     => \$config, 
    71         "servicedir=s" => \$servicedir, 
    72         "remove-also!" => \$removes, 
    73         "libdir=s"     => \$libdir, 
    74         "families=s"   => \@families, 
    75         "version=s"    => \$do_version, 
    76         "newer=s"      => \$newer 
     72        "help"            => \$do_usage, 
     73        "shell!"          => \$shell, 
     74        "debug!"          => \$debug, 
     75        "suggest!"        => \$suggest, 
     76        "config=s"        => \$config, 
     77        "servicedir=s"    => \$servicedir, 
     78        "remove-also!"    => \$removes, 
     79        "libdir=s"        => \$libdir, 
     80        "families=s"      => \@families, 
     81        "version=s"       => \$do_version, 
     82        "snmp=s"          => \@snmp, 
     83        "snmpversion=s"   => \$snmpver, 
     84        "snmpcommunity=s" => \$snmpcomm, 
     85        "newer=s"         => \$newer 
    7786); 
    7887 
     
    120129} 
    121130 
     131if (@snmp and !$shell) 
     132{ 
     133    print "Fatal: --snmp only supported along with --shell.\n"; 
     134    exit 3; 
     135} 
     136 
    122137if (!@families) 
    123138{ 
     
    271286        } 
    272287         
     288    } 
     289} 
     290 
     291if (@snmp and $shell) 
     292{ 
     293    if (-x "$bindir/munin-node-configure-snmp") 
     294    { 
     295        if (eval "require Net::SNMP;") 
     296        { 
     297            my @params; 
     298            push (@params, "$bindir/munin-node-configure-snmp"); 
     299            push (@params, "--snmpversion", $snmpver) if defined $snmpver; 
     300            push (@params, "--community", $snmpcomm) if defined $snmpcomm; 
     301            push (@params, @snmp); 
     302            exec (@params); 
     303            # NOTREACHED 
     304        } 
     305        else 
     306        { 
     307            print STDERR "# ERROR: Cannot perform SNMP probe. SNMP operations require the perl module\n"; 
     308            print STDERR "# Net::SNMP, which is currently not installed (or not in one of the following\n"; 
     309            print STDERR "# directories: @INC\n"; 
     310        } 
     311    } 
     312    else 
     313    { 
     314        print STDERR "# ERROR: Cannot perform SNMP probe. SNMP operations require the SNMP part\n"; 
     315        print STDERR "# of Munin to be installed, which is currently not installed, or not in the \n"; 
     316        print STDERR "# rigt directory: $bindir\n"; 
    273317    } 
    274318} 
  • trunk/node/node.d/snmp__df.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r141 r295  
    22# 
    33# $Log$ 
     4# Revision 1.2  2004/09/03 22:56:51  jimmyo 
     5# Added support for SNMP probing. 
     6# 
    47# Revision 1.1  2004/04/29 22:29:57  jimmyo 
    58# New SNMP plugin for disk usage. 
     
    122125if (defined $ARGV[0] and $ARGV[0] eq "config") 
    123126{ 
     127        print "host_name $host\n"; 
    124128    print "graph_title Filesystem usage (in %)\n"; 
    125129    print "graph_args --upper-limit 100 -l 0\n"; 
  • trunk/node/node.d/snmp__load.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r149 r295  
    22# 
    33# $Log$ 
     4# Revision 1.2  2004/09/03 22:56:51  jimmyo 
     5# Added support for SNMP probing. 
     6# 
    47# Revision 1.1  2004/05/01 10:50:53  jimmyo 
    58# New SNMP plugins users and load. 
     
    7578if (defined $ARGV[0] and $ARGV[0] eq "config") 
    7679{ 
     80        print "host_name $host\n"; 
    7781        print "graph_title Load average 
    7882graph_args --base 1000 -l 0  
  • trunk/node/node.d/snmp__processes.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r146 r295  
    22# 
    33# $Log$ 
     4# Revision 1.2  2004/09/03 22:56:51  jimmyo 
     5# Added support for SNMP probing. 
     6# 
    47# Revision 1.1  2004/04/30 20:13:53  jimmyo 
    58# New SNMP plugin for number of procs. 
     
    7275if (defined $ARGV[0] and $ARGV[0] eq "config") 
    7376{ 
     77        print "host_name $host\n"; 
    7478        print "graph_title Number of Processes 
    7579graph_args --base 1000 -l 0  
  • trunk/node/node.d/snmp__users.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r149 r295  
    22# 
    33# $Log$ 
     4# Revision 1.2  2004/09/03 22:56:51  jimmyo 
     5# Added support for SNMP probing. 
     6# 
    47# Revision 1.1  2004/05/01 10:50:53  jimmyo 
    58# New SNMP plugins users and load. 
     
    7578if (defined $ARGV[0] and $ARGV[0] eq "config") 
    7679{ 
     80        print "host_name $host\n"; 
    7781        print "graph_title Number of users 
    7882graph_args --base 1000 -l 0