masterzen / mysql-snmp

Net-SNMP perl agent for monitoring MySQL servers
http://www.masterzen.fr/software-contributions/mysql-snmp-monitor-mysql-with-snmp/
GNU General Public License v2.0
67 stars 33 forks source link

SNMP daemon does not see output from mysql #1

Closed wsargent closed 14 years ago

wsargent commented 14 years ago

So, set up the mysql-agent, and it appears to be running when I look at /var/log/syslog:

Dec 19 01:34:58 demo_db_primary mysql-agent[31165]: not refreshing: 136 < 300

However, running snmpwalk -m MYSQL-SERVER-MIB -v 2c -c public localhost enterprises.20267

results in

MYSQL-SERVER-MIB::enterprises.20267 = No more variables left in this MIB View (It is past the end of the MIB tree)

The snmpd server has been restarted, and the snmpd.conf file contains

master agentx

and the agentx unix domain socket appears to exist:

unix 3 [ ] STREAM CONNECTED 5167574 /var/agentx/master

There are no obvious errors in /var/log/syslog.

Any idea where to start looking? I've tried scli localhost, but it just says the default MIB stuff -- nothing about agentx or the mysql-agent.

Will.

masterzen commented 14 years ago

What version of net-snmp are you using? On what operating system? What version of perl?

I suggest you do the following:

First, you need to check that mysql-snmp can contact your mysql server, and fetches the values (in verbose mode it prints everything). You can also run net-snmp in debug mode to check it receives the connection from mysql-snmp. When you run your snmpwalk/snmpget command, mysql-snmp should print something (in verbose mode). If you get nothing in the mysql-snmp output, that means it didn't register with net-snmp, so check net-snmp logs.

Let me know if you find the problem.

masterzen commented 14 years ago

Better: run mysql-snmp with -n -v and send me its output when you issue your snmpwalk. Also make sure the user you run mysql-snmp has access and permission to r/w to the 'agentx' socket.

masterzen commented 14 years ago

Follow-up: it was a snmpd.conf issue: the default rocommunity user on debian has view access to system. only and not enterprises.