Open joeashcraft opened 9 years ago
Hi Joe,
It does take a little while for data to show up in Intelligence. If you still do not have data, you can enable debug logging in the agent. You do that by adding a line to the config file /etc/rackspace-monitoring-agent.cfg
that says: monitoring_debug true
After that line is added, restart the agent and you'll see more information logged. Find your check and you can post here the details returned by mysql (assuming there are).
Thank you,
Rob
PS The check runner does not have the username and password required to run the check as you would like, the best bet if using raxmon would be to send a test check with the details specified.
Thanks for the tip about the debug log. It turns out the MySQL user just didn't have proper privileges!
Fri Aug 21 10:51:24 2015 DBG: 2001::::::::443 (hostname=agent-endpoint-ord.monitoring.api.rackspacecloud.com connID=1) -> SENDING: (endpoint:500) => {"target":"endpoint","source":"axxxxxxx-fxxx-4xxx-cxxx-bxxxxx1xxxxx","id":"500","params":{"timestamp":1440193884000,"check_type":"agent.mysql","status":"mysql_query \"show slave status\" failed: (1227) Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation","state":"unavailable","min_check_period":75000,"metrics":[],"check_id":"chg61Xvxxx"},"v":"1","method":"check_metrics.post"}
For reference, here's the first few lines of debug log when this check works:
Fri Aug 21 10:53:39 2015 DBG: (plugin=agent.mysql, id=chg61Xvxxx, iid=idOPLeixxx) -> /usr/bin/rackspace-monitoring-agent: starting process
Fri Aug 21 10:53:39 2015 DBG: (plugin=agent.mysql, id=chg61Xvxxx, iid=idOPLeixxx) -> Setting check status string (status=success)
Fri Aug 21 10:53:39 2015 DBG: (plugin=agent.mysql, id=chg61Xvxxx, iid=idOPLeixxx) -> Metric added (dimension=innodb, name=os_log_pending_fsyncs, type=uint64, value=0, unit=queries)
Apparently, the minimum required privileges are process, replication client.
+-------------------------------------------------------------------------------------------------------------------------------------+
| Grants for raxmon@127.0.0.1 |
+-------------------------------------------------------------------------------------------------------------------------------------+
| GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'raxmon'@'127.0.0.1' IDENTIFIED BY PASSWORD '*ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789XXX' |
+-------------------------------------------------------------------------------------------------------------------------------------+
as for a feature request... it might be nice to have the MySQL error as something higher than DBG level output.
Thanks Joe. We'll definitely look into changing that error message to be logged at a higher level. We'll leave this open as a record to change that.
I'm unable to get the agent.mysql check to authenticate to the server. It seems it's using the default credentials (user 'root' with no password).
Symptoms:
agent.mysql check doesn't return any metrics, though the log shows it's trying to run.
Steps to Recreate:
{"host":"127.0.0.1","port":3306,"username":"raxmon","password":"qwerty1234"}
mysql -e "grant process on *.* to raxmon@localhost identified by 'qwerty1234'; flush privileges;"
/usr/bin/rackspace-monitoring-agent -d -o -e check_runner -x agent.mysql
output of check_runner:
log entry:
manual testing: