Created
November 7, 2017 04:30
-
-
Save lf-uraku-yuki/457e724e9232c0ce5128d13dd4f5cc45 to your computer and use it in GitHub Desktop.
zabbix-user parameter mysql.ping fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping 2>&1 | grep -c alive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zabbix 3.0デフォルトのMySQL監視ユーザーパラメーターは、MySQL(MariaDB)が起動している状態で実行すると1を返しますが、停止時には0だけでなく標準エラー出力への文字出力が含まれ、データ型が数値ではなくなってしまいます。エラー出力の方も標準出力に吐いてgrepに渡す事でMySQLのダウンを検知する事が出来ます。