• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

debian/H29-May-2014-336218

opennms/H03-May-2022-1,8891,624

redhat/H29-May-2014-164126

tests/H03-May-2022-492472

COPYINGH A D29-May-201417.6 KiB340281

MakefileH A D29-May-2014932 258

READMEH A D29-May-20143.3 KiB12288

my.cnfH A D29-May-201464 65

mysql-snmpH A D03-May-202252.4 KiB1,295941

mysql-snmp.1H A D29-May-20142.5 KiB11479

README

1MySQL Server SNMP Agent.
2Copyright (c) 2008,2009 Brice Figureau <brice.figureau@daysofwonder.com>
3
4PREAMBLE
5========
6
7mysql-snmp is a MySQL Net-SNMP agent written in Perl, and using the Net-Snmp
8Perl bindings.
9
10It connects to a mysql server and returns information to Net-SNMP when needed.
11It parses SHOW INNODB STATUS and other MySQL status variables.
12
13This work is based on Baron Schwartz Mysql Cacti Templates, available at:
14http://code.google.com/p/mysql-cacti-templates/
15
16This work is based on the blog post about a SNMP agent:
17http://mysqldump.azundris.com/archives/63-Sysadmins-Nightly-Mental-Pain-SNMP.html
18
19This software is released under the GPL v2.
20
21
22REQUIREMENTS
23============
24
25This package requires Net-SNMP version 5.4.3 or better. Previous versions have bugs preventing
26returning 64 bits MIBs objects correctly from a perl agentX.
27
28INSTALL
29=======
30
31Debian
32------
33
34Please build the package:
35$ dpkg-buildpackage -rfakeroot -uc- b
36
37and install it
38Then, modify /etc/default/mysql-snmp
39
40Other
41-----
42
43Modify the Makefile, and:
44$ sudo make install
45
46Then create an init.d startup script. You can look to the debian one
47in debian/init.d
48
49Install the MIB file in your mibs directory.
50
51CONFIGURE
52=========
53
54Configure net-snmp
55------------------
56
57Add:
58master agentx
59to /etc/snmp/snmpd.conf, and restart snmpd
60Make sure the mysql-snmp agent is able to open the agentX socket (permissions
61and location of said socket can be managed with the snmpd.conf agentXPerms
62directive).
63
64Configure mysql-snmp
65--------------------
66
67Under debian, the daemon can be configured with /etc/default/mysql-snmp.
68On all platform, the configuration is done with command line arguments:
69
70-h|--host HOST          connect to mysql HOST
71-P|--port PORT          port to connect to (default 3306)
72-u|--user DBUSER        use DBUSER as user to connect to mysql
73-p|--password DBPASS    use DBPASS as password to connect to mysql
74-c|--config FILE        read MySQL configuration from FILE
75
76-m|--master             check master
77-s|--slave              check slave
78-b|--heartbeat DB.TABLE table for Percona Toolkit pt-heartbeat
79--oid OID               registering OID
80-l|--process-list|--procs
81                        enable the MySQL process list
82-i|--refresh            refresh interval in seconds
83
84You can specify the mysql connection parameters in a config file using my.cnf format, like this:
85For example:
86
87[client]
88host=dbserver
89port=3306
90user=monitor
91password=secret
92
93
94OPENNMS
95=======
96
97You'll find in the opennms directory the various configuration snippets
98that can be used to let opennms graph the value reported by this agent.
99
100datacollection-config.xml
101-------------------------
102
103Add the content of opennms/mysql.datacollection-config.xml to
104your datacollection-config.xml file.
105
106Then add this group to your hosts:
107<systemDef name="Net-Snmp">
108  <sysoidMask>.1.3.6.1.4.1.8072.3.</sysoidMask>
109  <collect>
110    <includeGroup>mib2-host-resources-system</includeGroup>
111    <includeGroup>mib2-host-resources-memory</includeGroup>
112    <includeGroup>net-snmp-disk</includeGroup>
113    <includeGroup>ucd-loadavg</includeGroup>
114    <includeGroup>ucd-memory</includeGroup>
115    <includeGroup>ucd-sysstat</includeGroup>
116    <includeGroup>mysql</includeGroup>
117  </collect>
118</systemDef>
119
120And now, add the graph definitions from the opennms/mysql.snmp-graph.properties file
121to your snmp-graph.properties.
122