From 15f2a80d1035f254bb93a0f34009a05f77f688d2 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 16 Aug 2025 10:49:24 +1000 Subject: [PATCH] this tells kuma whether watchtower ran and worked, its runs on the host O/S to see all the logs of all containers changed --- kuma-watchtower-ran | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 kuma-watchtower-ran diff --git a/kuma-watchtower-ran b/kuma-watchtower-ran new file mode 100755 index 0000000..48e9748 --- /dev/null +++ b/kuma-watchtower-ran @@ -0,0 +1,16 @@ +#!/bin/bash + +now="$(date +%s)" + +# check to see if docker tried to update images last night +lastUpdate="$(stat -c %Y /srv/docker/log/update-docker.log)" +let diff_in_days="(${now}-${lastUpdate})/(3600*24)" +if [ $diff_in_days -gt 1 ]; then + echo ": watchtower did not run" + curl 'http://mara.ddp.net:3001/api/push/20N8YGGEiP?status=down&msg=OK' +else + # okay watchtower ran last night, lets just tell mon.depaoli.id.au so we dont get an alert + curl 'http://mara.ddp.net:3001/api/push/20N8YGGEiP?status=up&msg=OK' +fi + +exit 0