Projet

Général

Profil

Révision 06c8538a

ID06c8538aa15fb4be1491f1f57ba615a9d791fb1b
Parent 9c29d496
Enfant 6aa03315

Ajouté par Alex Mestiashvili il y a presque 9 ans

Update README.pod

Voir les différences:

tools/munin2snmp/README.pod
4 4

  
5 5
=head1 REQUIREMENTS
6 6

  
7
Net::SNMP and IO::Socket perl modules, munin-node with some plugins
7
Net::SNMP, Getopt::Long, Pod::Usage perl modules, munin-node with some plugins
8 8

  
9 9
=head2 Example configuration
10 10

  
......
22 22

  
23 23
See also http://www.net-snmp.org/wiki/index.php/FAQ:MIBs_03
24 24

  
25
It is possible to start munin2snmp as non-root user, for example
26
run munin2snmp as Debian-snmp user on Debian Stretch:
27

  
28
fix the /var/agentx permissions:
29

  
30
  chmod  g+rx /var/agentx
31
  chgrp Debian-snmp /var/agentx
32

  
33
add to /etc/snmp/snmpd.conf: 
34

  
35
  master          agentx
36
  agentXperms 0640 0550 Debian-snmp Debian-snmp
37

  
38
restart snmpd and start the agent as Debian-snmp:
39

  
40
  su -l Debian-snmp -s /bin/bash -c "/tmp/munin2snmp.pl --pidfile /tmp/munin2snmp.pid --plugins iostat,vmstat"
25 41

  
26 42
=head2 Usage
27 43

  
28 44
After setting up snmpd, start the agent:
29 45

  
30
  ./munin2snmp.pl
46
  ./munin2snmp
31 47

  
32 48
Now one can query the agent
33 49

  
......
36 52
where "1.3.6.1.4.1.123456.100.1.1" is example OID selected as the base
37 53
tree for the agent.
38 54

  
55
Change  OBJECT IDENTIFIER in the MUNIN-MIB file if you plan to use a different OID.
56

  
39 57
You might need to change the host, port, oidbase and munin_plugins you want to use.
40 58

  
41 59
The defaults:
......
43 61
  $Munin{PORT} = '4949';
44 62
  $Munin{HOST} = 'localhost'
45 63
  $oidbase = ".1.3.6.1.4.1.123456.100.1.1"
46
  @munin_plugins = qw ( load swap users uptime vmstat df );
64
  @munin_plugins = qw ( load cpu df );
65

  
66
One can override the defaults by creating /etc/munin2snmp.conf file with the following
67
configuration options:
68

  
69
  munin_port    = [port]
70
  munin_host    = [host]
71
  base_oid      = [oid]
72
  munin_plugins = [comma separated list of munin-node plugins]
73

  
74
Or by specifying the parameters, see munin2snmp --help for the usage
47 75

  
48 76
=head1 ACKNOWLEDGEMENTS
49 77

  
......
51 79
Vincent Bernat: https://github.com/vincentbernat/extend-netsnmp
52 80
and Masahito Zembutsu: https://github.com/zembutsu/muninwalk
53 81

  
54
=head1 AUTHOR
55

  
56
Alex Mestiashvili <mailatgoogl@gmail.com>
57
 
58 82
=head1 LICENSE
59 83

  
60
GPLv2
84
ISC License (ISC)
85

  
86
Copyright (c) 2016, Alex Mestiashvili <mailatgoogl@gmail.com>
61 87

  
88
Permission to use, copy, modify, and/or distribute this software for any
89
purpose with or without fee is hereby granted, provided that the above
90
copyright notice and this permission notice appear in all copies.
62 91

  
92
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
93
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
94
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
95
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
96
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
97
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
98
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Formats disponibles : Unified diff