From bb7f51f514495ebdf501620f5da33b0302a7da93 Mon Sep 17 00:00:00 2001 From: dvirlabs <114520947+dvirlabs@users.noreply.github.com> Date: Sun, 10 Aug 2025 03:20:15 +0300 Subject: [PATCH] Update monitor.yml --- .github/workflows/monitor.yml | 90 +++++++++++++++++------------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.github/workflows/monitor.yml b/.github/workflows/monitor.yml index 8d73dd6..aa2d6ef 100644 --- a/.github/workflows/monitor.yml +++ b/.github/workflows/monitor.yml @@ -1,49 +1,49 @@ -name: Monitor Lab URLs +# name: Monitor Lab URLs -on: - schedule: - - cron: "*/5 * * * *" - workflow_dispatch: +# on: +# schedule: +# - cron: "*/5 * * * *" +# workflow_dispatch: -jobs: - monitor: - runs-on: ubuntu-latest - steps: - - name: Check services - run: | - check_url() { - URL=$1 - NAME=$2 - STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL") - TIME=$(date "+%Y-%m-%d %H:%M:%S") +# jobs: +# monitor: +# runs-on: ubuntu-latest +# steps: +# - name: Check services +# run: | +# check_url() { +# URL=$1 +# NAME=$2 +# STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL") +# TIME=$(date "+%Y-%m-%d %H:%M:%S") - if [[ "$STATUS" == "502" || "$STATUS" == "404" ]]; then - curl -s \ - --form-string "token=${{ secrets.PUSHOVER_TOKEN }}" \ - --form-string "user=${{ secrets.PUSHOVER_USER }}" \ - --form-string "title=🔴 $NAME Alert" \ - --form-string "message=⚠️ $URL is down ($STATUS) at $TIME" \ - --form-string "priority=2" \ - --form-string "retry=60" \ - --form-string "expire=600" \ - https://api.pushover.net/1/messages.json - else - echo "✅ $NAME is up: $STATUS" - fi - } +# if [[ "$STATUS" == "502" || "$STATUS" == "404" ]]; then +# curl -s \ +# --form-string "token=${{ secrets.PUSHOVER_TOKEN }}" \ +# --form-string "user=${{ secrets.PUSHOVER_USER }}" \ +# --form-string "title=🔴 $NAME Alert" \ +# --form-string "message=⚠️ $URL is down ($STATUS) at $TIME" \ +# --form-string "priority=2" \ +# --form-string "retry=60" \ +# --form-string "expire=600" \ +# https://api.pushover.net/1/messages.json +# else +# echo "✅ $NAME is up: $STATUS" +# fi +# } - check_url "https://git.dvirlabs.com" "git" - check_url "https://harbor.dvirlabs.com" "harbor" - check_url "https://wiki.dvirlabs.com" "wiki" - check_url "https://vault.dvirlabs.com" "vault" - check_url "https://woodpecker.dvirlabs.com" "woodpecker" - check_url "https://minio.dvirlabs.com" "minio" - check_url "https://grafana.dvirlabs.com" "grafana" - check_url "https://kibana-int.dvirlabs.com" "kibana-int" - check_url "https://kibana.dvirlabs.com" "kibana" - check_url "https://alertmanager.dvirlabs.com" "alertmanager" - check_url "https://grafana.dvirlabs.com" "grafana" - check_url "https://prometheus.dvirlabs.com" "prometheus" - check_url "https://prometheus.dvirlabs.com" "prometheus" - check_url "https://prometheus-int.dvirlabs.com" "prometheus-int" - check_url "https://kuma.dvirlabs.com" "kuma" +# check_url "https://git.dvirlabs.com" "git" +# check_url "https://harbor.dvirlabs.com" "harbor" +# check_url "https://wiki.dvirlabs.com" "wiki" +# check_url "https://vault.dvirlabs.com" "vault" +# check_url "https://woodpecker.dvirlabs.com" "woodpecker" +# check_url "https://minio.dvirlabs.com" "minio" +# check_url "https://grafana.dvirlabs.com" "grafana" +# check_url "https://kibana-int.dvirlabs.com" "kibana-int" +# check_url "https://kibana.dvirlabs.com" "kibana" +# check_url "https://alertmanager.dvirlabs.com" "alertmanager" +# check_url "https://grafana.dvirlabs.com" "grafana" +# check_url "https://prometheus.dvirlabs.com" "prometheus" +# check_url "https://prometheus.dvirlabs.com" "prometheus" +# check_url "https://prometheus-int.dvirlabs.com" "prometheus-int" +# check_url "https://kuma.dvirlabs.com" "kuma"