zabbix monitoring mysql database
- by krisdigitx
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...