[collectd] mysql plugin issue

Israel Garcia igalvarez at gmail.com
Wed Oct 21 19:07:42 CEST 2009


Hi list,

I'm configuring mysql plugin to see stats of my local databases.let me
first ask you, in case I dont setup the Database block  <Database
"data1">   inside <Plugin "mysql">, what is collectd monitoring? mysql
database?

let's go to my problem, this is the collectd.conf output:

Hostname server.domain
FQDNLookup true
Interval 60

<Plugin network>
Server "xx.xx.xx.xx" "25826"
</Plugin>

LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin swap
LoadPlugin mysql

<Plugin "mysql">
 <Database "data1">
   Host "localhost"
   User "collectd"
   Password "passwd"
 </Database>
 <Database "data2">
   Host "localhost"
   User "collectd"
   Password "passwd"
 </Database>
</Plugin>

LoadPlugin syslog

<Plugin "syslog">
  LogLevel "notice"
</Plugin>

When I restart collectd to the new configuration, I get this error on syslog:

Oct 21 11:50:17 server collectdmon[14037]: Info: shutting down collectdmon
Oct 21 11:50:19 server  collectd[14118]: mysql_real_connect failed:
Access denied for user 'root'@'localhost' (using password: NO)
Oct 21 11:50:19 server collectd[14118]: read-function of plugin
`mysql' failed. Will suspend it for 60 seconds.

More information:

Using collectd 7.4.1, the mysql user collectd runs with no problem
show status command on mysql console, BUT If I use this configuration
of  plugin mysql inside collectd.conf config, see below,  I got no
error when restarting but I don't see any stats of specific databases.
.
.
<Plugin "mysql">
  Host "localhost"
  User "collectd"
  Password "passwd"
  Port "3306"
</Plugin>
.
.

Last question: In case I have a lot of databases, the only way to
monitor them is creating a new  <Database "dataxx"> block inside
collectd.conf? Or is there any other way to collectd shows me all
graphs with only one entry in collectd.conf?

thanks tons..
-- 
Regards;
Israel Garcia



More information about the collectd mailing list