DEVOPS · SLO + SUPPLY CHAIN

monsys.ai in je CI/CD-flow

SLO error budgets, deploy-gates op Trust Score, npm-supply-chain monitoring, terraform-drift detectie, LLM cost per team. Vijf hooks in je bestaande pipeline.

Volledige docs
01

SLO + error budget per applicatie

Je wil weten: hoeveel minuten downtime hebben we deze maand nog 'in budget'? En hoe snel branden we het bij dit tempo op?

  1. Sidebar → Apps → klik je applicatie
  2. Tab SLO → 'Definieer SLO' → target 0.999 + 30 dagen
  3. Burn-down sparkline verschijnt in dezelfde tab
  4. Knop 'Embed badge' voor README

SLO-history CSV-exporteerbaar voor sprint reviews. Burn rate > 2.0 in laatste uur = freeze deploys.

Hetzelfde via API (bash) — voor automatisering
curl -X POST https://app.monsys.ai/api/v1/apps/<id>/slo \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "target":      0.999,
    "window_days": 30,
    "minimum_data": 0.95
  }'

# /operations/mttr now shows: rolling 30d uptime,
# error budget remaining (minutes), burn-down sparkline,
# days-until-budget-exhausted if you keep burning.
02

Block deploy als kritieke alert open is OF Trust Score te laag

Anti-pattern: 'deploy nu, kijken naar alerts later'. Je wil het mechanisch onmogelijk maken.

  1. Sidebar → Settings → API Tokens → genereer scoped readonly token
  2. Sidebar → AI Insights → 'Deploy gate template' → copy bash snippet
  3. Plak in je CI yaml vóór deploy stap
  4. Test met --dry-run — toont Trust Score + open alerts

Deploy-decision zit in CI-logs en (optioneel) in audit_log via webhook callback. Onomstreden hoe je hebt besloten.

Hetzelfde via API (bash) — voor automatisering
#!/usr/bin/env bash
OPEN_CRITICAL=$(curl -s \
  "https://app.monsys.ai/api/v1/alerts?severity=critical&is_resolved=false&tag=production" \
  -H "Authorization: Bearer $MONSYS_TOKEN" | jq '. | length')

[[ "$OPEN_CRITICAL" -gt 0 ]] && {
  echo "✗ refusing deploy: $OPEN_CRITICAL critical alerts open"
  exit 1
}

SCORE=$(curl -s "https://app.monsys.ai/api/v1/trust-score/v12/tenant" \
  -H "Authorization: Bearer $MONSYS_TOKEN" | jq '.final_score')

[[ "$SCORE" -lt 70 ]] && {
  echo "✗ refusing deploy: Trust Score $SCORE/100 < 70"
  exit 1
}

echo "✓ Trust Score $SCORE — proceeding"
03

Auto-update CVE-kwetsbare npm-deps, maar pin onze DB-driver

Je wil bulk-fixen via 'Auto-update all', maar mysql2 versie 2.4.x heeft een ABI break die je productie raakt.

  1. Sidebar → Aanbevelingen → 'Application CVEs'
  2. Bij mysql2 → 3-dots → 'Suppress this fix'
  3. Vul expires_at + reden in
  4. Future Auto-update-all toont skip met reden

cve_suppressions verschijnt in de Audit Pack onder 'managed exceptions' — auditor ziet bewuste beslissing, niet vergeten bug.

Hetzelfde via API (bash) — voor automatisering
curl -X POST https://app.monsys.ai/api/v1/cve-suppressions \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "package_name":  "mysql2",
    "ecosystem":     "npm",
    "version_range": ">=2.4.0",
    "reason":        "ABI break — see PROD-123",
    "expires_at":    "2026-09-01"
  }'

# Future "Auto-update all" skips this upgrade
# AND records the reason in monthly evidence.
04

Detecteer npm-maintainer wisseling (supply-chain indicator)

Een legitiem npm-package waar je op vertrouwt krijgt opeens een nieuwe publish-maintainer. Vaak benigne — soms voorbode van een compromise.

  1. Sidebar → Inventaris → tab Dependencies
  2. Filter 'Maintainer changed last 7 days'
  3. Per package: huidige + vorige maintainer set
  4. Klik verdachte → 'Pin version' of 'Investigate'

Hit triggert webhook naar je incident-tooling. Optioneel: IsolateNetwork EAT op staging waar de package al binnen is.

Hetzelfde via API (sql) — voor automatisering
SELECT package_name, ecosystem,
       maintainers, deprecated,
       last_maintainer_change_at, seen_at
  FROM supply_chain_maintainer_cache
 WHERE tenant_id = $1::UUID
   AND last_maintainer_change_at
       >= NOW() - INTERVAL '7 days'
 ORDER BY last_maintainer_change_at DESC;
05

LLM-kost per team via SDK

Je hele org gebruikt OpenAI/Claude. Je wil weten: welk team kost wat, en wat is de p95 latency van wie.

  1. Sidebar → AI → tab 'Per team'
  2. Standaard groepering op 'team' tag uit SDK
  3. Filter op kosten of latency p95
  4. 'Export CSV maand' voor cross-charge

CSV-export per maand voor financiële cross-charge. Tokens + cost + p95 + refusal rate per team, project, model.

Hetzelfde via API (python) — voor automatisering
from monsys_ai import MonsysClient

client = MonsysClient(
    hub_url="https://hub.monsys.ai",
    api_key=os.environ["MONSYS_AI_TOKEN"],
    tenant="acme",
    team="checkout",        # → tag op every trace
)

with client.trace("price-lookup") as t:
    resp = openai.chat.completions.create(...)
    t.add_llm_call(
        model=resp.model,
        prompt_tokens=resp.usage.prompt_tokens,
        completion_tokens=resp.usage.completion_tokens,
    )

Andere rollen

Lees de uitgebreide praktijk-docs