1

私は現在、特定のステータスがしきい値に達したときに警告する Monit 構成に取り組んでいます。

check program check_something with path "/root/scripts/check_something.sh"
  if status > 10 then alert

上記の構成はうまく機能し、ステータスがまだしきい値を超えている場合は、定期的なアラートを毎日追加したいと考えています。

4

2 に答える 2

1

timeout1日に相当する86400秒を追加することで、問題を解決できました。

check program check_something with path "/root/scripts/check_something.sh"
  if status > 10 then alert
  if status > 10 with timeout 86400 seconds then alert
于 2013-11-22T03:51:04.193 に答える
0

エラー リマインダーの設定を使用する必要があります。

まず、サイクルの期間をつかみます。通常、n はデュレーションである/etc/monitrcファイルにあります。set daemon n

次に、毎日 1 つが必要な場合は、1 日あたりのサイクル数を計算します。

number_cyle_per_day = 24*60*60/n

最後に、スクリプトで使用します。

check program check_something with path "/root/scripts/check_something.sh"
  if status > 10 then alert reminder on number_cyle_per_day cycles

このように動作するはずです!

于 2013-09-27T11:11:39.713 に答える