Authority Monitoring & Alerting Playbook

Audience: operators and SREs running the Stella Ops Authority service.

This playbook lists the traces, metrics, and logs the Authority service emits, the Prometheus series and alert rules to derive from them, and the Grafana and OpenTelemetry Collector configuration to wire it all together. Pair it with the Key rotation playbook so you know which signals to watch during and after a rotation.

Telemetry Sources

Prometheus Metrics to Collect

MetricQueryPurpose
token_requests_totalsum by (grant_type, status) (rate(http_server_duration_seconds_count{service_name="stellaops-authority", http_route="/token"}[5m]))Token issuance volume per grant type (grant_type comes via authority.grant_type span attribute → Exemplars in Grafana).
token_failure_ratio`sum(rate(http_server_duration_seconds_count{service_name=“stellaops-authority”, http_route=“/token”, http_status_code=~"4…5…“}[5m])) / sum(rate(http_server_duration_seconds_count{service_name=“stellaops-authority”, http_route=”/token"}[5m]))`
authorize_rate_limit_hitssum(rate(aspnetcore_rate_limiting_rejections_total{service_name="stellaops-authority", limiter="authority-token"}[5m]))Detect rate limiting saturations (requires OTEL ASP.NET rate limiter exporter).
lockout_eventssum by (plugin) (rate(log_messages_total{app="stellaops-authority", level="Warning", message_template="Plugin {PluginName} denied access for {Username} due to lockout (retry after {RetryAfter})."}[5m]))Derived from Loki/Promtail log counter.
bypass_usage_totalsum(rate(log_messages_total{app="stellaops-authority", level="Information", message_template="Granting StellaOps bypass for remote {RemoteIp}; required scopes {RequiredScopes}."}[5m]))Track trusted bypass invocations.

Exporter note: Enable aspnetcore meters (dotnet-counters name Microsoft.AspNetCore.Hosting), or configure the OpenTelemetry Collector metrics pipeline with metric_statements to remap histogram counts into the shown series.

Alert Rules

  1. Token Failure Surge
    • Expression: token_failure_ratio > 0.05
    • For: 10m
    • Labels: severity="critical"
    • Annotations: Include topk(5, sum by (authority_identity_provider) (increase(authority_token_rejections_total[10m]))) as diagnostic hint (requires span → metric transformation).
  2. Lockout Spike
    • Expression: sum(rate(log_messages_total{message_template="Plugin {PluginName} denied access for {Username} due to lockout (retry after {RetryAfter})."}[15m])) > 10
    • For: 15m
    • Investigate credential stuffing; consider temporarily tightening RateLimiting.Token.
  3. Bypass Threshold
    • Expression: sum(rate(log_messages_total{message_template="Granting StellaOps bypass for remote {RemoteIp}; required scopes {RequiredScopes}."}[5m])) > 1
    • For: 5m
    • Alert severity warning — verify the calling host list.
  4. Rate Limiter Saturation
    • Expression: sum(rate(aspnetcore_rate_limiting_rejections_total{service_name="stellaops-authority"}[5m])) > 0
    • Escalate if sustained for 5 min; confirm trusted clients aren’t misconfigured.

Grafana Dashboard

Collector Configuration Snippets

receivers:
  otlp:
    protocols:
      http:
exporters:
  prometheus:
    endpoint: "0.0.0.0:9464"
processors:
  batch:
  attributes/token_grant:
    actions:
      - key: grant_type
        action: upsert
        from_attribute: authority.grant_type
service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [attributes/token_grant, batch]
      exporters: [prometheus]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [loki]

Operational Checklist