Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

8.6 KB
Raw Blame
# GENERATED by scripts/generate_slo_alerts.py — do not edit.
#
# Thresholds come from docs/operations/slos.yaml. Editing them here makes
# the alert disagree with the objective it exists to enforce, which is the
# state this file was written to end: the SLOs declared targets nothing
# alerted on, and the alerts used thresholds no objective justified.
#
# Only services that expose /metrics are covered. An alert on a service
# Prometheus does not scrape can never fire, and an alert that can never
# fire reads as coverage.

groups:
- name: aisoc-slo
  rules:
  - alert: SloAgentsErrorBudgetFastBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-agents",status=~"5.."}[1h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-agents"}[1h])), 0.001)
        > 0.144000
    for: 5m
    labels:
      severity: page
      service: agents
      slo: availability
    annotations:
      summary: agents is burning its error budget fast
      description: At this rate agents consumes 2% of its 30-day error budget every 1h. Target is 99.000% availability (docs/operations/slos.yaml).
  - alert: SloAgentsErrorBudgetSlowBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-agents",status=~"5.."}[6h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-agents"}[6h])), 0.001)
        > 0.120000
    for: 30m
    labels:
      severity: ticket
      service: agents
      slo: availability
    annotations:
      summary: agents is steadily burning its error budget
      description: "Not an outage, which is why this is a ticket rather than a page \u2014 but at this rate agents exhausts its 30-day budget without any single incident to point at."
  - alert: SloAgentsLatencyBudgetMissed
    expr: |-
      histogram_quantile(0.95, sum by (le) (rate(aisoc_http_request_duration_seconds_bucket{job="aisoc-agents"}[30m])))
        > 120.000
    for: 15m
    labels:
      severity: ticket
      service: agents
      slo: latency
    annotations:
      summary: agents p95 latency is over its objective
      description: p95 above 120000 ms, the target in docs/operations/slos.yaml. Measured over 30 minutes so a single slow request does not page.
  - alert: SloApiErrorBudgetFastBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-api",status=~"5.."}[1h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-api"}[1h])), 0.001)
        > 0.014400
    for: 5m
    labels:
      severity: page
      service: api
      slo: availability
    annotations:
      summary: api is burning its error budget fast
      description: At this rate api consumes 2% of its 30-day error budget every 1h. Target is 99.900% availability (docs/operations/slos.yaml).
  - alert: SloApiErrorBudgetSlowBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-api",status=~"5.."}[6h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-api"}[6h])), 0.001)
        > 0.012000
    for: 30m
    labels:
      severity: ticket
      service: api
      slo: availability
    annotations:
      summary: api is steadily burning its error budget
      description: "Not an outage, which is why this is a ticket rather than a page \u2014 but at this rate api exhausts its 30-day budget without any single incident to point at."
  - alert: SloApiLatencyBudgetMissed
    expr: |-
      histogram_quantile(0.95, sum by (le) (rate(aisoc_http_request_duration_seconds_bucket{job="aisoc-api"}[30m])))
        > 0.300
    for: 15m
    labels:
      severity: ticket
      service: api
      slo: latency
    annotations:
      summary: api p95 latency is over its objective
      description: p95 above 300 ms, the target in docs/operations/slos.yaml. Measured over 30 minutes so a single slow request does not page.
  - alert: SloFusionErrorBudgetFastBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-fusion",status=~"5.."}[1h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-fusion"}[1h])), 0.001)
        > 0.014400
    for: 5m
    labels:
      severity: page
      service: fusion
      slo: availability
    annotations:
      summary: fusion is burning its error budget fast
      description: At this rate fusion consumes 2% of its 30-day error budget every 1h. Target is 99.900% availability (docs/operations/slos.yaml).
  - alert: SloFusionErrorBudgetSlowBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-fusion",status=~"5.."}[6h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-fusion"}[6h])), 0.001)
        > 0.012000
    for: 30m
    labels:
      severity: ticket
      service: fusion
      slo: availability
    annotations:
      summary: fusion is steadily burning its error budget
      description: "Not an outage, which is why this is a ticket rather than a page \u2014 but at this rate fusion exhausts its 30-day budget without any single incident to point at."
  - alert: SloFusionLatencyBudgetMissed
    expr: |-
      histogram_quantile(0.95, sum by (le) (rate(aisoc_http_request_duration_seconds_bucket{job="aisoc-fusion"}[30m])))
        > 0.500
    for: 15m
    labels:
      severity: ticket
      service: fusion
      slo: latency
    annotations:
      summary: fusion p95 latency is over its objective
      description: p95 above 500 ms, the target in docs/operations/slos.yaml. Measured over 30 minutes so a single slow request does not page.
  - alert: SloIngestErrorBudgetFastBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-ingest",status=~"5.."}[1h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-ingest"}[1h])), 0.001)
        > 0.014400
    for: 5m
    labels:
      severity: page
      service: ingest
      slo: availability
    annotations:
      summary: ingest is burning its error budget fast
      description: At this rate ingest consumes 2% of its 30-day error budget every 1h. Target is 99.900% availability (docs/operations/slos.yaml).
  - alert: SloIngestErrorBudgetSlowBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-ingest",status=~"5.."}[6h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-ingest"}[6h])), 0.001)
        > 0.012000
    for: 30m
    labels:
      severity: ticket
      service: ingest
      slo: availability
    annotations:
      summary: ingest is steadily burning its error budget
      description: "Not an outage, which is why this is a ticket rather than a page \u2014 but at this rate ingest exhausts its 30-day budget without any single incident to point at."
  - alert: SloIngestLatencyBudgetMissed
    expr: |-
      histogram_quantile(0.95, sum by (le) (rate(aisoc_http_request_duration_seconds_bucket{job="aisoc-ingest"}[30m])))
        > 0.200
    for: 15m
    labels:
      severity: ticket
      service: ingest
      slo: latency
    annotations:
      summary: ingest p95 latency is over its objective
      description: p95 above 200 ms, the target in docs/operations/slos.yaml. Measured over 30 minutes so a single slow request does not page.
  - alert: SloThreatintelErrorBudgetFastBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-threatintel",status=~"5.."}[1h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-threatintel"}[1h])), 0.001)
        > 0.144000
    for: 5m
    labels:
      severity: page
      service: threatintel
      slo: availability
    annotations:
      summary: threatintel is burning its error budget fast
      description: At this rate threatintel consumes 2% of its 30-day error budget every 1h. Target is 99.000% availability (docs/operations/slos.yaml).
  - alert: SloThreatintelErrorBudgetSlowBurn
    expr: |-
      sum(rate(aisoc_http_requests_total{job="aisoc-threatintel",status=~"5.."}[6h]))
        / clamp_min(sum(rate(aisoc_http_requests_total{job="aisoc-threatintel"}[6h])), 0.001)
        > 0.120000
    for: 30m
    labels:
      severity: ticket
      service: threatintel
      slo: availability
    annotations:
      summary: threatintel is steadily burning its error budget
      description: "Not an outage, which is why this is a ticket rather than a page \u2014 but at this rate threatintel exhausts its 30-day budget without any single incident to point at."
  - alert: SloThreatintelLatencyBudgetMissed
    expr: |-
      histogram_quantile(0.95, sum by (le) (rate(aisoc_http_request_duration_seconds_bucket{job="aisoc-threatintel"}[30m])))
        > 1.000
    for: 15m
    labels:
      severity: ticket
      service: threatintel
      slo: latency
    annotations:
      summary: threatintel p95 latency is over its objective
      description: p95 above 1000 ms, the target in docs/operations/slos.yaml. Measured over 30 minutes so a single slow request does not page.