diff --git a/pm2-self-heal.sh b/scripts/pm2-self-heal.sh similarity index 93% rename from pm2-self-heal.sh rename to scripts/pm2-self-heal.sh index 49b7806..9c7da2b 100755 --- a/pm2-self-heal.sh +++ b/scripts/pm2-self-heal.sh @@ -15,10 +15,11 @@ send_alert() { local body="$2" curl -s -X POST "$ZULIP_SITE/api/v1/messages" \ -u "$ZULIP_BOT:$ZULIP_KEY" \ - -d "type=private" \ - -d "to=[$OWNER_ID]" \ + -d "type=stream" \ + -d "to=agent-hub" \ + -d "subject=alerts-pm2" \ -d "content=$subject\n$body" > /dev/null 2>&1 - echo "[$(date '+%Y-%m-%d %H:%M:%S')] Alert sent" >> "$LOG" + echo "[$(date '+%Y-%m-%d %H:%M:%S')] Alert sent to #agent-hub > alerts-pm2" >> "$LOG" } # Log-only mode: replaced by prose contract pm2-self-heal.prose.md