compute_slo

Compute SLI/SLO metrics from InfluxDB query results.

Compute SLI/SLO metrics from InfluxDB query results.

Read-only · Calls external systems. Safe to call: this tool does not modify data.

Parameters

FieldTypeRequiredDescription
good_fieldstringNoField name for good events (default 'good')
operatorstringYesOperator slug (= InfluxDB database name)
precisionstringNoQuery time precision (s, ms, u, ns)
querystringYesInfluxQL query returning good/total fields
slo_targetnumberYesSLO target percentage (e.g. 99.9)
total_fieldstringNoField name for total events (default 'total')
windowstringNoSLO window (default '30d'). Supported: Nd, Nh

Example arguments

Illustrative arguments an agent supplies when calling this tool:

{
  "operator": "string",
  "query": "string",
  "slo_target": 0
}

Description

Uses Google SRE burn-rate methodology.

Prerequisite: Run query_metrics with SHOW MEASUREMENTS and SHOW FIELD KEYS first to discover which measurement contains success/failure counts.

Example: SELECT sum("number_success") AS good, sum("number_success") + sum("number_failed") AS total FROM "test" WHERE time > now() - 30d GROUP BY time(1d)

The tool extracts good/total fields, computes SLI, error budget, burn rate, and severity.

Severity thresholds (Google SRE):
- critical: burn rate > 14.4x (page immediately)
- red: burn rate > 6x (create ticket)
- yellow: burn rate > 1x (SLO at risk)
- green: burn rate <= 1x (within budget)

What's next?

All MCP tools

Browse the full tool reference by category.

Connect a client

Point Claude, Cursor, or Claude Code at the server.

Last updated on