shithub: infra

Download patch

ref: ecf93a43decacde35e43b6953fc6446e563c2ed2
parent: e12a6f38ed13ac24b1dad7be0d499cbea9b1bf0f
author: Sergey Ryabin <ryabin.ss@gmail.com>
date: Sun Jan 17 22:29:38 EST 2021

add simple monitoring (inferno)shell script

--- /dev/null
+++ b/scripts/monitoring/check_mount.sh
@@ -1,0 +1,21 @@
+load std
+
+CHAT=tcp!grid.a-b.xyz!9990
+CHAT_MNPT=/mnt/chat
+BOT_NAME='observer'
+
+send_chat_msg = {
+   text = $1
+   mount -A $CHAT $CHAT_MNPT
+   echo $BOT_NAME^' → '^"{date}^$text >> $CHAT_MNPT^'/noise'
+   unmount $CHAT_MNPT
+} 
+
+check_mount = {
+  address = $1
+  mount -A $address /mnt/test || {
+    $send_chat_msg 'mount '^$address^' [FAILED]'
+  }
+}
+
+$check_mount tcp!registry.9p.zone!registry
\ No newline at end of file