shithub: infra

ref: 8b1d5d0f185c744c201b1262318cecadc0f94f4e
dir: /scripts/monitoring/check_mount.sh/

View raw version
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