LoginSignup
2
0

More than 5 years have passed since last update.

MackerelでMySQLサーバとの接続を監視する

Posted at
[plugin.checks.mysql_connectivity]
command = "MYSQL_PWD=password mysqladmin status --host=$MYSQL_HOST --user=$USER || exit 2"

mysqladminの異常時の終了ステータスは1です。
Mackerel Checkプラグインの仕様では、1がWarning、2がCriticalとなります。
接続に不具合があった場合、Criticalで通知してほしいので||で繋いで2に変更しています。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0