forked from Nova-reward/Nova-Rewards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-alerts.sh
More file actions
32 lines (28 loc) · 839 Bytes
/
Copy pathtest-alerts.sh
File metadata and controls
32 lines (28 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo "🧪 Testing Nova Rewards Alert System..."
# Test Alertmanager connectivity
echo "1. Testing Alertmanager..."
if curl -s http://localhost:9093/api/v1/status > /dev/null; then
echo "✅ Alertmanager is reachable"
else
echo "❌ Alertmanager is not reachable"
exit 1
fi
# Send test alert
echo "2. Sending test alert..."
curl -X POST http://localhost:9093/api/v1/alerts \
-H "Content-Type: application/json" \
-d '[{
"labels": {
"alertname": "TestAlert",
"severity": "warning",
"component": "monitoring"
},
"annotations": {
"summary": "Test alert from monitoring setup",
"description": "This is a test alert to verify the alerting pipeline"
}
}]'
echo ""
echo "✅ Test alert sent!"
echo "Check your notification channels (Slack/PagerDuty) for the alert."