-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
430 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,6 +189,3 @@ storage | |
|
||
# otel files | ||
tempo-data/ | ||
|
||
# simulation | ||
simulate* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
ALERTS = { | ||
"high_cpu_usage": { | ||
"payload": { | ||
"title": "High CPU Usage", | ||
"type": "metric alert", | ||
"query": "avg(last_5m):avg:system.cpu.user{*} by {host} > 90", | ||
"message": "CPU usage is over 90% on {{host.name}}.", | ||
"tags": "environment:production, team:backend", | ||
"priority": "P3", | ||
"monitor_id": "1234567890", | ||
}, | ||
"parameters": { | ||
"tags": [ | ||
"environment:production,team:backend,monitor", | ||
"environment:staging,team:backend,monitor", | ||
], | ||
"priority": ["P2", "P3", "P4"], | ||
}, | ||
}, | ||
"low_disk_space": { | ||
"payload": { | ||
"title": "Low Disk Space", | ||
"type": "metric alert", | ||
"query": "avg(last_1h):min:system.disk.free{*} by {host} < 20", | ||
"message": "Disk space is below 20% on {{host.name}}.", | ||
"tags": "environment:production,team:database", | ||
"priority": 4, | ||
"monitor_id": "1234567891", | ||
}, | ||
"parameters": { | ||
"tags": [ | ||
"environment:production,team:analytics,monitor", | ||
"environment:staging,team:database,monitor", | ||
], | ||
"priority": ["P1", "P3", "P4"], | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
ALERTS = { | ||
"database_connection_failure": { | ||
"payload": { | ||
"condition": "A", | ||
"data": [ | ||
{ | ||
"datasourceUid": "datasource1", | ||
"model": { | ||
"conditions": [ | ||
{ | ||
"evaluator": {"params": [1], "type": "gt"}, | ||
"operator": {"type": "and"}, | ||
"query": {"params": ["A", "5m", "now"]}, | ||
"reducer": {"params": [], "type": "last"}, | ||
"type": "query", | ||
} | ||
], | ||
"datasource": {"type": "grafana", "uid": "datasource1"}, | ||
"expression": "", | ||
"hide": False, | ||
"intervalMs": 1000, | ||
"maxDataPoints": 100, | ||
"refId": "A", | ||
"type": "classic_conditions", | ||
}, | ||
"queryType": "", | ||
"refId": "A", | ||
"relativeTimeRange": {"from": 300, "to": 0}, | ||
} | ||
], | ||
"execErrState": "Alerting", | ||
"folderUID": "keep_alerts", | ||
"for_": "5m", | ||
"isPaused": False, | ||
"labels": {"severity": "critical", "monitor": "database"}, | ||
"noDataState": "NoData", | ||
"orgID": 1, | ||
"ruleGroup": "keep_group_1", | ||
"title": "Database Connection Failure", | ||
}, | ||
"parameters": { | ||
"labels.monitor": ["database1", "database2", "database3"], | ||
"for_": ["5m", "10m", "15m"], | ||
}, | ||
}, | ||
"high_memory_usage": { | ||
"payload": { | ||
"condition": "B", | ||
"data": [ | ||
{ | ||
"datasourceUid": "datasource2", | ||
"model": { | ||
"conditions": [ | ||
{ | ||
"evaluator": {"params": [80], "type": "gt"}, | ||
"operator": {"type": "or"}, | ||
"query": {"params": ["B", "10m", "now"]}, | ||
"reducer": {"params": [], "type": "avg"}, | ||
"type": "query", | ||
} | ||
], | ||
"datasource": {"type": "grafana", "uid": "datasource2"}, | ||
"expression": "", | ||
"hide": False, | ||
"intervalMs": 2000, | ||
"maxDataPoints": 50, | ||
"refId": "B", | ||
"type": "classic_conditions", | ||
}, | ||
"queryType": "", | ||
"refId": "B", | ||
"relativeTimeRange": {"from": 600, "to": 0}, | ||
} | ||
], | ||
"execErrState": "Alerting", | ||
"folderUID": "keep_alerts", | ||
"for_": "10m", | ||
"isPaused": False, | ||
"labels": {"severity": "warning", "monitor": "memory"}, | ||
"noDataState": "NoData", | ||
"orgID": 1, | ||
"ruleGroup": "keep_group_2", | ||
"title": "High Memory Usage", | ||
}, | ||
"parameters": { | ||
"labels.monitor": ["server1", "server2", "server3"], | ||
"for_": ["10m", "30m", "1h"], | ||
}, | ||
}, | ||
"network_latency_high": { | ||
"payload": { | ||
"condition": "C", | ||
"data": [ | ||
{ | ||
"datasourceUid": "datasource3", | ||
"model": { | ||
"conditions": [ | ||
{ | ||
"evaluator": {"params": [100], "type": "gt"}, | ||
"operator": {"type": "and"}, | ||
"query": {"params": ["C", "15m", "now"]}, | ||
"reducer": {"params": [], "type": "max"}, | ||
"type": "query", | ||
} | ||
], | ||
"datasource": {"type": "grafana", "uid": "datasource3"}, | ||
"expression": "", | ||
"hide": False, | ||
"intervalMs": 3000, | ||
"maxDataPoints": 30, | ||
"refId": "C", | ||
"type": "classic_conditions", | ||
}, | ||
"queryType": "", | ||
"refId": "C", | ||
"relativeTimeRange": {"from": 900, "to": 0}, | ||
} | ||
], | ||
"execErrState": "Alerting", | ||
"folderUID": "keep_alerts", | ||
"for_": "15m", | ||
"isPaused": False, | ||
"labels": {"severity": "info", "monitor": "network"}, | ||
"noDataState": "NoData", | ||
"orgID": 1, | ||
"ruleGroup": "keep_group_3", | ||
"title": "Network Latency High", | ||
}, | ||
"parameters": { | ||
"labels.monitor": ["router1", "router2", "router3"], | ||
"for_": ["15m", "45m", "1h"], | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
ALERTS = { | ||
"high_cpu_usage": { | ||
"payload": { | ||
"summary": "CPU usage is over 90%", | ||
"labels": { | ||
"instance": "example1", | ||
"job": "example2", | ||
"workfload": "somecoolworkload", | ||
"severity": "critical", | ||
}, | ||
}, | ||
"parameters": { | ||
"labels.host": ["host1", "host2", "host3"], | ||
"labels.instance": ["instance1", "instance2", "instance3"], | ||
}, | ||
}, | ||
"mq_third_full": { | ||
"payload": { | ||
"summary": "Message queue is over 33% capacity", | ||
"labels": { | ||
"severity": "warning", | ||
}, | ||
}, | ||
"parameters": { | ||
"labels.queue": ["queue1", "queue2", "queue3"], | ||
"labels.mq_manager": ["mq_manager1", "mq_manager2", "mq_manager3"], | ||
}, | ||
}, | ||
"disk_space_low": { | ||
"payload": { | ||
"summary": "Disk space is below 20%", | ||
"labels": { | ||
"severity": "warning", | ||
}, | ||
}, | ||
"parameters": { | ||
"labels.host": ["host1", "host2", "host3"], | ||
"labels.instance": ["instance1", "instance2", "instance3"], | ||
}, | ||
}, | ||
"network_latency_high": { | ||
"payload": { | ||
"summary": "Network latency is higher than normal", | ||
"labels": { | ||
"severity": "info", | ||
}, | ||
}, | ||
"parameters": { | ||
"labels.host": ["host1", "host2", "host3"], | ||
"labels.instance": ["instance1", "instance2", "instance3"], | ||
}, | ||
}, | ||
} |
Oops, something went wrong.