0
0

More than 1 year has passed since last update.

[Ubuntu Desktop] curlコマンドで死活監視して落ちていたら通知を表示するワンライナー

Last updated at Posted at 2023-04-21

http://xxx.xxx.xxx.xxx:8000/ 宛にcurlで60秒間隔で死活監視を行い、接続できなかった場合に notify-send でデスクトップ通知するワンライナーです。
開発期間中にZabbixやJenkinsなどを使うまでもなく雑に死活監視したい場合などに使えます。

watch -n 60 "(! curl -fs http://xxx.xxx.xxx.xxx:8000/ -o /dev/null) && notify-send 'NG'"
0
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
0
0