zabbix monitoring mysql database

Posted by krisdigitx on Server Fault See other posts from Server Fault or by krisdigitx
Published on 2012-02-14T12:13:47Z Indexed on 2012/03/26 11:33 UTC
Read the original article Hit count: 343

Filed under:
|

I have a server running multiple instances of mysql and also has the zabbix-agent running.

In zabbix_agentd.conf i have specified:

UserParameter=multi.mysql[*],mysqladmin --socket=$1  -uzabbixagent extended-status 2>/dev/null | awk '/ $3 /{print $$4}'

where $1 is the socket instance.

From the zabbix server i can run the test successfully.

zabbix_get -s ip_of_server  -k multi.mysql[/var/lib/mysql/mysql2.sock]

and it returns all the values

However the zabbix item/trigger does not generate the graphs, I have created a MACRO for $1 which is the socket location

{$MYSQL_SOCKET1} = '/var/lib/mysql/mysql2.sock'

and i use this key in items to poll the value

multi.mysql[{$MYSQL_SOCKET1},Bytes_sent]

LOGS:

this is what i get on the logs:

3360:20120214:144716.278 item [multi.mysql['/var/lib/mysql/mysql2.sock',Bytes_received]] error: Special characters '\'"`*?[]{}~$!&;()<>|#@' are not allowed in the parameters
  3360:20120214:144716.372 item [multi.mysql['/var/lib/mysql/mysql2.sock',Bytes_sent]] error: Special characters '\'"`*?[]{}~$!&;()<>|#@' are not allowed in the parameters

Any ideas where the problem could be?

FIXED

{$MYSQL_SOCKET1} = /var/lib/mysql/mysql2.sock

i removed the single quotes from the line and it worked...

© Server Fault or respective owner

Related posts about linux

Related posts about zabbix