From 06399e537a51112fbb1ba26864f76754b66a493d Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Thu, 28 Jul 2022 02:37:04 +0000 Subject: [PATCH] monitor validators, now with logging. --- monitor-validator-cerberus.sh | 9 ++++++++- monitor-validator-evmos.sh | 9 ++++++++- monitor-validator-lum.sh | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/monitor-validator-cerberus.sh b/monitor-validator-cerberus.sh index 191e6de..619d1f2 100755 --- a/monitor-validator-cerberus.sh +++ b/monitor-validator-cerberus.sh @@ -5,6 +5,13 @@ LOCATION=`dirname "$0"` missed_blocks=`curl -s 'https://api-cerberus.cosmostation.io/v1/staking/validator/uptime/cerberusvaloper1krkmg6f0sjwalkx3nq39yt0upxgys7alcjytq4' | jq '.uptime | length'` if [ "$missed_blocks" -gt 0 ]; then - ${LOCATION}/discord.sh general "Cerberus is missing ${missed_blocks} blocks out of the last 100." + `${LOCATION}/discord.sh general "Cerberus is missing ${missed_blocks} blocks out of the last 100."` +fi + +echo -n "${missed_blocks}," + +if [ -z `date | grep ':00:'` ]; then + echo "" + date fi diff --git a/monitor-validator-evmos.sh b/monitor-validator-evmos.sh index d8c135a..ac6fde0 100755 --- a/monitor-validator-evmos.sh +++ b/monitor-validator-evmos.sh @@ -5,6 +5,13 @@ LOCATION=`dirname "$0"` missed_blocks=`curl -s 'https://api-evmos.cosmostation.io/v1/staking/validator/uptime/evmosvaloper187860d5xukeksge9jz3wwff7h68asdafxdxh4r' | jq '.uptime | length'` if [ "$missed_blocks" -gt 0 ]; then - ${LOCATION}/discord.sh general "EVMOS is missing ${missed_blocks} blocks out of the last 100." + `${LOCATION}/discord.sh general "EVMOS is missing ${missed_blocks} blocks out of the last 100."` +fi + +echo -n "${missed_blocks}," + +if [ -z `date | grep ':00:'` ]; then + echo "" + date fi diff --git a/monitor-validator-lum.sh b/monitor-validator-lum.sh index 7592537..f016836 100755 --- a/monitor-validator-lum.sh +++ b/monitor-validator-lum.sh @@ -5,6 +5,13 @@ LOCATION=`dirname "$0"` missed_blocks=`curl -s 'https://api-lum.cosmostation.io/v1/staking/validator/uptime/lumvaloper1krkmg6f0sjwalkx3nq39yt0upxgys7alme6lps' | jq '.uptime | length'` if [ "$missed_blocks" -gt 0 ]; then - ${LOCATION}/discord.sh general "Lum Network is missing ${missed_blocks} blocks out of the last 100." + `${LOCATION}/discord.sh general "Lum Network is missing ${missed_blocks} blocks out of the last 100."` +fi + +echo -n "${missed_blocks}," + +if [ -z `date | grep ':00:'` ]; then + echo "" + date fi