diff options
author | anweshadas <anwesha@das.community> | 2022-05-12 10:56:48 +0200 |
---|---|---|
committer | anweshadas <anwesha@das.community> | 2022-05-12 10:56:48 +0200 |
commit | f4b75773928c1196bb92fbc430d20f8039c69f4a (patch) | |
tree | a86c4a8aa8febcbf37b6e30ea77c4095bd755c41 /scripts | |
parent | 79917705ae56646a9e728951d225858f95e10cec (diff) |
Adds better fail message for get-inclusion-proof
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/monitor.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/monitor.sh b/scripts/monitor.sh index 01f4adc..3abb8dc 100755 --- a/scripts/monitor.sh +++ b/scripts/monitor.sh @@ -105,10 +105,11 @@ function check_inclusion_proof() { desc="GET get-inclusion-proof (tree_size $1, data \"$2\")" signature=$(echo $2 | sigsum-debug leaf sign -k $cli_priv -h $ssrv_shard_start) leaf_hash=$(echo $2 | sigsum-debug leaf hash -k $cli_key_hash -s $signature -h $ssrv_shard_start) - curl -s -w "%{http_code}" $log_url/get-inclusion-proof/$1/$leaf_hash >$log_dir/rsp + api=$log_url/get-inclusion-proof/$1/$leaf_hash + curl -s -w "%{http_code}" $api >$log_dir/rsp cp $log_dir/rsp $log_dir/rsp_get_inclusion_proof status_code=$(tail -n1 < $log_dir/rsp) - api=$log_url/get-inclusion-proof + if [[ $status_code != 200 ]]; then msg="$(date +"%y-%m-%d %H:%M:%S %Z") Warning: $api is down with status_code $status_code" # Failure message |