Init
This commit is contained in:
parent
c823102a63
commit
d37503c863
20 changed files with 4433 additions and 3 deletions
198
rud.json
Normal file
198
rud.json
Normal file
|
|
@ -0,0 +1,198 @@
|
|||
{
|
||||
"server": {
|
||||
"listen": ":8080",
|
||||
"endpoint": "/",
|
||||
"refresh_interval": "10s",
|
||||
"status_codes": {
|
||||
"html": {
|
||||
"up": 200,
|
||||
"degraded": 200,
|
||||
"down": 200,
|
||||
"pending": 200
|
||||
},
|
||||
"json": {
|
||||
"up": 200,
|
||||
"degraded": 200,
|
||||
"down": 503,
|
||||
"pending": 200
|
||||
}
|
||||
}
|
||||
},
|
||||
"storage": {
|
||||
"history_size": 60,
|
||||
"save_interval": "1m"
|
||||
},
|
||||
"defaults": {
|
||||
"interval": "15s",
|
||||
"timeout": "5s",
|
||||
"retries": 1,
|
||||
"degraded_latency": "750ms"
|
||||
},
|
||||
"monitors": [
|
||||
{
|
||||
"id": "rud-http",
|
||||
"name": "RUD Status Endpoint",
|
||||
"description": "Local HTTP health check",
|
||||
"method": "http",
|
||||
"url": "http://127.0.0.1:8080/?format=json",
|
||||
"http_method": "GET",
|
||||
"expected_status": [
|
||||
200,
|
||||
503
|
||||
],
|
||||
"body_regex": "\"status\""
|
||||
},
|
||||
{
|
||||
"id": "rud-tcp",
|
||||
"name": "Local TCP Listener",
|
||||
"description": "TCP socket handshake on port 8080",
|
||||
"method": "tcp",
|
||||
"target": "127.0.0.1:8080"
|
||||
},
|
||||
{
|
||||
"id": "local-ping",
|
||||
"name": "Loopback ICMP Ping",
|
||||
"description": "Direct ping reachability check",
|
||||
"method": "ping",
|
||||
"host": "127.0.0.1",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"id": "local-dns",
|
||||
"name": "Localhost DNS Resolution",
|
||||
"description": "Verifies A record resolution for localhost",
|
||||
"method": "dns",
|
||||
"host": "localhost",
|
||||
"record_type": "A",
|
||||
"expected_regex": "^127\\."
|
||||
},
|
||||
{
|
||||
"id": "host-cmd",
|
||||
"name": "System Shell Check",
|
||||
"description": "Custom command check verifying shell responsiveness",
|
||||
"method": "cmd",
|
||||
"command": "echo ok",
|
||||
"shell": true,
|
||||
"expected_exit_code": 0,
|
||||
"output_regex": "^ok"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"id": "core-outage",
|
||||
"name": "Core Monitors Down or Degraded Uptime",
|
||||
"cooldown": "30m",
|
||||
"trigger_on_recovery": true,
|
||||
"condition": {
|
||||
"operator": "or",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "state",
|
||||
"monitors": [
|
||||
"rud-http",
|
||||
"rud-tcp"
|
||||
],
|
||||
"match": "all",
|
||||
"state": "down"
|
||||
},
|
||||
{
|
||||
"type": "metric",
|
||||
"monitors": [
|
||||
"*"
|
||||
],
|
||||
"match": "any",
|
||||
"metric": "uptime_pct",
|
||||
"comparator": "<",
|
||||
"value": 50,
|
||||
"for": "5m"
|
||||
}
|
||||
]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"type": "command",
|
||||
"timeout": "5s",
|
||||
"command": "echo \"[RUD ALERT] {{.EventName}}: status={{.Status}} monitors={{.TriggeredMonitors}}\"",
|
||||
"shell": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"page": {
|
||||
"title": "R u ded?",
|
||||
"theme": {
|
||||
"bg_color": "#111111",
|
||||
"card_bg_color": "#191919",
|
||||
"text_color": "#e5e5e5",
|
||||
"muted_text_color": "#888888",
|
||||
"border_color": "#2e2e2e",
|
||||
"accent_color": "#cccccc",
|
||||
"up_color": "#2ecc71",
|
||||
"degraded_color": "#f1c40f",
|
||||
"down_color": "#e74c3c",
|
||||
"pending_color": "#7f8c8d",
|
||||
"font_family": "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
|
||||
"max_width": "820px",
|
||||
"border_radius": "2px"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"type": "header",
|
||||
"title": "R u ded?",
|
||||
"subtitle": "Minimalist system status & health monitor",
|
||||
"align": "split",
|
||||
"show_last_updated": true,
|
||||
"show_live_indicator": true
|
||||
},
|
||||
{
|
||||
"type": "status_banner",
|
||||
"messages": {
|
||||
"degraded": "Kinda — Some systems are experiencing degraded performance",
|
||||
"down": "Yes — One or more systems are down",
|
||||
"pending": "Checking system status...",
|
||||
"up": "No — All systems operational"
|
||||
},
|
||||
"show_overall_uptime": true,
|
||||
"show_counts": true
|
||||
},
|
||||
{
|
||||
"type": "summary_cards",
|
||||
"metrics": [
|
||||
"total",
|
||||
"up",
|
||||
"degraded",
|
||||
"down",
|
||||
"overall_uptime",
|
||||
"avg_latency"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "monitor_group",
|
||||
"title": "Monitored Services",
|
||||
"description": "Live health checks",
|
||||
"monitors": [
|
||||
"*"
|
||||
],
|
||||
"layout": "list",
|
||||
"display": {
|
||||
"show_bar": true,
|
||||
"bar_ticks": 40,
|
||||
"show_uptime": true,
|
||||
"show_latency": true,
|
||||
"show_status_badge": true,
|
||||
"show_method": true,
|
||||
"show_target": false,
|
||||
"show_description": true,
|
||||
"show_message": false,
|
||||
"show_last_checked": false,
|
||||
"custom_labels": {
|
||||
"degraded": "SLOW",
|
||||
"down": "DED",
|
||||
"pending": "WAIT",
|
||||
"up": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue