mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Add munin2snmp, snmp agent for querying munin-node plugins over snmp
This commit is contained in:
parent
c24aaaf9d0
commit
45941d87dc
3 changed files with 372 additions and 0 deletions
58
tools/munin2snmp/README.pod
Normal file
58
tools/munin2snmp/README.pod
Normal file
|
@ -0,0 +1,58 @@
|
|||
=head1 NAME
|
||||
|
||||
munin2snmp - SNMP Agent to query munin-node over snmp
|
||||
|
||||
=head1 REQUIREMENTS
|
||||
|
||||
Net::SNMP and IO::Socket perl modules, munin-node with some plugins
|
||||
|
||||
=head2 Example configuration
|
||||
|
||||
/etc/snmp/snmpd.conf
|
||||
|
||||
master agentx
|
||||
agentAddress udp:127.0.0.1:161
|
||||
rocommunity public 127.0.0.1
|
||||
|
||||
On a newer system it is enough to define "master" option only
|
||||
|
||||
MUNIN-MIB should be installed on the client,
|
||||
it goes to /usr/local/share/snmp/mibs or /usr/share/munin/mibs
|
||||
or another place where snmpd expects to find the MIB files.
|
||||
|
||||
See also http://www.net-snmp.org/wiki/index.php/FAQ:MIBs_03
|
||||
|
||||
|
||||
=head2 Usage
|
||||
|
||||
After setting up snmpd, start the agent:
|
||||
|
||||
./munin2snmp.pl
|
||||
|
||||
Now one can query the agent
|
||||
|
||||
snmpwalk -v 2c -mMUNIN-MIB -c public localhost .1.3.6.1.4.1.123456.100.1.1
|
||||
|
||||
where "1.3.6.1.4.1.123456.100.1.1" is example OID selected as the base
|
||||
tree for the agent.
|
||||
|
||||
You might need to change the host, port, oidbase and munin_plugins you want to use.
|
||||
|
||||
The defaults:
|
||||
|
||||
$Munin{PORT} = '4949';
|
||||
$Munin{HOST} = 'localhost'
|
||||
$oidbase = ".1.3.6.1.4.1.123456.100.1.1"
|
||||
@munin_plugins = qw ( load swap users uptime vmstat df );
|
||||
|
||||
=head1 ACKNOWLEDGEMENTS
|
||||
|
||||
Heavily inspired by
|
||||
Vincent Bernat: https://github.com/vincentbernat/extend-netsnmp
|
||||
and Masahito Zembutsu: https://github.com/zembutsu/muninwalk
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
GPLv2
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue