diff options
Diffstat (limited to 'scripts/silentct-check')
-rwxr-xr-x | scripts/silentct-check | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/silentct-check b/scripts/silentct-check index 35d38c7..a6a79a3 100755 --- a/scripts/silentct-check +++ b/scripts/silentct-check @@ -77,6 +77,12 @@ while IFS= read -r line; do done <"$metrics_file" #----------------------------------------------------------------------------------------- +# Parse restart metric +#----------------------------------------------------------------------------------------- +line=$(grep "^silentct_need_restart" "$metrics_file") +need_restart=$(echo $line | awk '{print $NF}') + +#----------------------------------------------------------------------------------------- # Emit warnings #----------------------------------------------------------------------------------------- now=$(date +%s) @@ -96,3 +102,7 @@ for stored_at in "${!certificate_alert[@]}"; do observed_at=$(awk "BEGIN {printf \"%.0f\", ${certificate_alert[$stored_at]}}") warn "(mis)-issued certificate? Observed at $(date -d @$observed_at) -- see $stored_at" done + +if [[ $need_restart != 0 ]]; then + warn "silentct-mon needs to be restarted" +fi |