add dummy-data for testing

pull/949/head
3thibaut1304 2025-07-05 01:37:12 +02:00
parent 50b8199474
commit bf8f0da19c
3 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,31 @@
{
"status": "success",
"data": {
"alerts": [
{
"labels": {
"alertname": "DemoPendingThenFiring",
"severity": "warning"
},
"annotations": {
"summary": "Demo Alert"
},
"state": "firing",
"activeAt": "2025-07-04T23:09:29.244509801Z",
"value": "1e+00"
},
{
"labels": {
"alertname": "DemoAlwaysFiring",
"severity": "critical"
},
"annotations": {
"summary": "Critical Test Alert"
},
"state": "firing",
"activeAt": "2025-07-04T23:09:29.244509801Z",
"value": "1e+00"
}
]
}
}

View File

@ -0,0 +1,127 @@
{
"status": "success",
"data": {
"groups": [
{
"name": "demo",
"file": "/etc/prometheus/alert.rules.yml",
"rules": [
{
"state": "firing",
"name": "DemoPendingThenFiring",
"query": "vector(1)",
"duration": 120,
"keepFiringFor": 0,
"labels": {
"severity": "warning"
},
"annotations": {
"summary": "Demo Alert"
},
"alerts": [
{
"labels": {
"alertname": "DemoPendingThenFiring",
"severity": "warning"
},
"annotations": {
"summary": "Demo Alert"
},
"state": "firing",
"activeAt": "2025-07-04T23:09:29.244509801Z",
"value": "1e+00"
}
],
"health": "ok",
"evaluationTime": 0.000211901,
"lastEvaluation": "2025-07-05T01:33:29.245332571+02:00",
"type": "alerting"
},
{
"state": "firing",
"name": "DemoAlwaysFiring",
"query": "vector(1)",
"duration": 0,
"keepFiringFor": 0,
"labels": {
"severity": "critical"
},
"annotations": {
"summary": "Critical Test Alert"
},
"alerts": [
{
"labels": {
"alertname": "DemoAlwaysFiring",
"severity": "critical"
},
"annotations": {
"summary": "Critical Test Alert"
},
"state": "firing",
"activeAt": "2025-07-04T23:09:29.244509801Z",
"value": "1e+00"
}
],
"health": "ok",
"evaluationTime": 0.000074511,
"lastEvaluation": "2025-07-05T01:33:29.245547238+02:00",
"type": "alerting"
}
],
"interval": 60,
"limit": 0,
"evaluationTime": 0.000303826,
"lastEvaluation": "2025-07-05T01:33:29.245319516+02:00"
},
{
"name": "wireguard",
"file": "/etc/prometheus/alert.rules.yml",
"rules": [
{
"state": "inactive",
"name": "WireGuardClientConnected",
"query": "(time() - wireguard_latest_handshake_seconds) \u003c 30 and absent(wireguard_latest_handshake_seconds offset 10m)",
"duration": 30,
"keepFiringFor": 0,
"labels": {
"severity": "info"
},
"annotations": {
"description": "🔌 Peer : {{ $labels.name }} ({{ $labels.ipv4Address }}) connected to WireGuard",
"summary": "🔌 Login : {{ $labels.name }}"
},
"alerts": [],
"health": "ok",
"evaluationTime": 0.000193607,
"lastEvaluation": "2025-07-05T01:34:02.853540745+02:00",
"type": "alerting"
},
{
"state": "inactive",
"name": "WireGuardClientDisconnected",
"query": "(time() - wireguard_latest_handshake_seconds) \u003e 300 and (time() - wireguard_latest_handshake_seconds offset 10m) \u003c 600",
"duration": 120,
"keepFiringFor": 0,
"labels": {
"severity": "warning"
},
"annotations": {
"description": "📴 No more WireGuard activity for {{ $labels.name }} ({{ $labels.ipv4Address }}) since >5 min",
"summary": "📴 Logout : {{ $labels.name }}"
},
"alerts": [],
"health": "ok",
"evaluationTime": 0.000102034,
"lastEvaluation": "2025-07-05T01:34:02.853736466+02:00",
"type": "alerting"
}
],
"interval": 60,
"limit": 0,
"evaluationTime": 0.000306811,
"lastEvaluation": "2025-07-05T01:34:02.853533091+02:00"
}
]
}
}

View File

@ -0,0 +1,11 @@
{
"status": "success",
"data": {
"version": "2.53.5",
"revision": "d344ea7bf4cc9e9e131a0318d10025982e9c4cc1",
"branch": "HEAD",
"buildUser": "root@31e33add4c49",
"buildDate": "20250630-10:18:05",
"goVersion": "go1.23.10"
}
}