Secure messenger with TLS identities, scoped OpenBao secrets and worker compromise experiments
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
groups:
|
||||
- name: messenger
|
||||
interval: 2s
|
||||
rules:
|
||||
- alert: APIHighErrorRate
|
||||
expr: (sum(rate(haproxy_backend_http_responses_total{proxy="replicas",code="5xx"}[30s])) or vector(0)) / clamp_min(sum(rate(haproxy_backend_http_responses_total{proxy="replicas"}[30s])), 0.001) > 0.1
|
||||
for: 6s
|
||||
labels: {severity: warning}
|
||||
annotations: {summary: 'API 5xx above 10% for 30s window', runbook: 'RUNBOOK.md#db'}
|
||||
- alert: QueueLag
|
||||
expr: max(messenger_queue_oldest_age_seconds) > 5 and max(messenger_queue_depth) > 0
|
||||
for: 6s
|
||||
labels: {severity: warning}
|
||||
annotations: {summary: 'Oldest unfinished job exceeds 5s', runbook: 'RUNBOOK.md#worker'}
|
||||
- alert: APIBudgetFastBurn
|
||||
expr: ((sum(rate(haproxy_backend_http_responses_total{proxy="replicas",code="5xx"}[10s])) or vector(0)) / clamp_min(sum(rate(haproxy_backend_http_responses_total{proxy="replicas"}[10s])),0.001) > 6 * 0.01) and ((sum(rate(haproxy_backend_http_responses_total{proxy="replicas",code="5xx"}[60s])) or vector(0)) / clamp_min(sum(rate(haproxy_backend_http_responses_total{proxy="replicas"}[60s])),0.001) > 6 * 0.01)
|
||||
for: 10s
|
||||
labels: {severity: critical, slo: api_99}
|
||||
annotations: {summary: 'API budget burn >6x in 10s and 60s', runbook: 'RUNBOOK.md#db'}
|
||||
- alert: APIBudgetSlowBurn
|
||||
expr: ((sum(rate(haproxy_backend_http_responses_total{proxy="replicas",code="5xx"}[30s])) or vector(0)) / clamp_min(sum(rate(haproxy_backend_http_responses_total{proxy="replicas"}[30s])),0.001) > 2 * 0.01) and ((sum(rate(haproxy_backend_http_responses_total{proxy="replicas",code="5xx"}[120s])) or vector(0)) / clamp_min(sum(rate(haproxy_backend_http_responses_total{proxy="replicas"}[120s])),0.001) > 2 * 0.01)
|
||||
for: 20s
|
||||
labels: {severity: warning, slo: api_99}
|
||||
annotations: {summary: 'API budget burn >2x in 30s and 120s', runbook: 'RUNBOOK.md#db'}
|
||||
- alert: ReadyBudgetFastBurn
|
||||
expr: (sum(rate(messenger_attachment_sli_bad_total[10s])) / clamp_min(sum(rate(messenger_attachment_sli_total[10s])),0.001) > 6 * 0.05) and (sum(rate(messenger_attachment_sli_bad_total[60s])) / clamp_min(sum(rate(messenger_attachment_sli_total[60s])),0.001) > 6 * 0.05)
|
||||
for: 10s
|
||||
labels: {severity: critical, slo: ready_95}
|
||||
annotations: {summary: 'Ready deadline budget burn >6x in 10s and 60s', runbook: 'RUNBOOK.md#worker'}
|
||||
@@ -0,0 +1,15 @@
|
||||
global: {scrape_interval: 2s, evaluation_interval: 2s}
|
||||
rule_files: [/etc/prometheus/alerts.yaml]
|
||||
scrape_configs:
|
||||
- job_name: messenger
|
||||
scheme: https
|
||||
tls_config: {ca_file: /run/tls/ca.crt, cert_file: /run/tls/cert.crt, key_file: /run/tls/key.key}
|
||||
static_configs: [{targets: ['collector:8889']}]
|
||||
- job_name: collector
|
||||
scheme: https
|
||||
tls_config: {ca_file: /run/tls/ca.crt, cert_file: /run/tls/cert.crt, key_file: /run/tls/key.key}
|
||||
static_configs: [{targets: ['collector:8888']}]
|
||||
- job_name: ingress
|
||||
scheme: https
|
||||
tls_config: {ca_file: /run/tls/ca.crt, cert_file: /run/tls/cert.crt, key_file: /run/tls/key.key}
|
||||
static_configs: [{targets: ['lb:8404']}]
|
||||
Reference in New Issue
Block a user