forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbandwidth-alerts.yml
More file actions
63 lines (60 loc) · 2.5 KB
/
Copy pathbandwidth-alerts.yml
File metadata and controls
63 lines (60 loc) · 2.5 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Network Bandwidth Alerting Rules
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: bandwidth-alerts
namespace: monitoring
labels:
prometheus: kube-prometheus
role: alert-rules
spec:
groups:
- name: bandwidth.alerts
rules:
# Sustained high ingress on any single pod
- alert: HighIngressBandwidth
expr: |
gistpin:network_ingress_bytes_per_second > 104857600
for: 5m
labels:
severity: warning
team: infrastructure
annotations:
summary: "High ingress bandwidth on {{ $labels.pod }}"
description: "Pod {{ $labels.pod }} ingress exceeds 100 MiB/s for 5 minutes (current: {{ $value | humanizeBytes }}/s)."
runbook_url: "https://github.com/PinSpace-Org/GistPin/blob/main/infrastructure/docs/RUNBOOKS.md#bandwidth"
# Sustained high egress — cost concern
- alert: HighEgressBandwidth
expr: |
gistpin:network_egress_bytes_per_second > 52428800
for: 5m
labels:
severity: warning
team: infrastructure
annotations:
summary: "High egress bandwidth on {{ $labels.pod }}"
description: "Pod {{ $labels.pod }} egress exceeds 50 MiB/s for 5 minutes (current: {{ $value | humanizeBytes }}/s). Check for data exfil or misconfigured clients."
runbook_url: "https://github.com/PinSpace-Org/GistPin/blob/main/infrastructure/docs/RUNBOOKS.md#bandwidth"
# Anomalous spike — 3× normal baseline
- alert: BandwidthAnomalyDetected
expr: |
gistpin:network_total_bytes_per_second
> 3 * avg_over_time(gistpin:network_total_bytes_per_second[1h] offset 1h)
for: 3m
labels:
severity: warning
team: infrastructure
annotations:
summary: "Bandwidth anomaly on {{ $labels.pod }}"
description: "Bandwidth is 3× the 1-hour baseline on pod {{ $labels.pod }}."
# Daily egress cost exceeds budget threshold
- alert: EgressCostExceedsBudget
expr: |
sum(gistpin:estimated_egress_cost_usd_daily) > 50
for: 0m
labels:
severity: warning
team: infrastructure
annotations:
summary: "Estimated daily egress cost exceeds $50"
description: "Projected 24-hour egress cost is ${{ $value | printf \"%.2f\" }}. Review top consumers in the bandwidth dashboard."