What do these lines do? How do they work?
UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | HOME=/var/lib/zabbix mysql -N | awk '{print $$2}'
When I put mysql -N | awk '{print $$3}', I get an access denied error for mysql.
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive
If I put the code mysqladmin ping | grep -c alive in the command it returns 1. I assume that to mean that the mysql server is running, because when I stop mysqld, the code returns 0. But what does the "HOME=/var/lib/zabbix" part do?
I know that the mysql.ping is the key for the item that we want to monitor.
UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | HOME=/var/lib/zabbix mysql -N | awk '{print $$2}'
When I put mysql -N | awk '{print $$3}', I get an access denied error for mysql.
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive
If I put the code mysqladmin ping | grep -c alive in the command it returns 1. I assume that to mean that the mysql server is running, because when I stop mysqld, the code returns 0. But what does the "HOME=/var/lib/zabbix" part do?
I know that the mysql.ping is the key for the item that we want to monitor.

Comment