Verified Commit 29a15ad2 authored by Florian Pritz's avatar Florian Pritz
Browse files

zabbix-agent: Add mysql config for mysql checks



Template only for now. Deployed manually on luna, not yet integrated
with apollo.
Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent d7291c4d
......@@ -16,6 +16,10 @@
notify:
- restart zabbix agent
- name: Create mysql config for agent checks
template: src=my.cnf.j2 dest=/etc/zabbix/zabbix_agentd.my.cnf owner=zabbix-agent group=zabbix-agent mode=600
when: zabbix_agent_mysql_user is defined
- name: run zabbix agent service
service: name=zabbix-agent enabled=yes state=started
[client]
user={{zabbix_agent_mysql_user}}
password={{zabbix_agent_mysql_password}}
......@@ -9,9 +9,9 @@ TLSAccept=psk
TLSPSKIdentity=PSK{{ansible_hostname|lower}}
TLSPSKFile=/etc/zabbix/zabbix_agentd.psk
UserParameter=mysql.ping,mysqladmin ping|grep alive|wc -l
UserParameter=mysql.version,mysql -V
UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | mysql -N | awk '{print $$2}'
UserParameter=mysql.ping,mysqladmin --defaults-file="/etc/zabbix/zabbix_agentd.my.cnf" ping|grep alive|wc -l
UserParameter=mysql.version,mysql --defaults-file="/etc/zabbix/zabbix_agentd.my.cnf" -V
UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | mysql --defaults-file="/etc/zabbix/zabbix_agentd.my.cnf" -N | awk '{print $$2}'
UserParameter=systemd.unit.is-active[*],systemctl is-active --quiet '$1' && echo 1 || echo 0
UserParameter=systemd.unit.is-failed[*],systemctl is-failed --quiet '$1' && echo 1 || echo 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment