correlate_metrics

Detect cross-metric relationships: are these metrics related?

Detect cross-metric relationships: are these metrics related?

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

Parameters

FieldTypeRequiredDescription
modestring (quick | full | shift)NoAnalysis mode: 'quick' (default, correlation only), 'full' (correlation + KS shift + lag scan), 'shift' (KS distribution shift only)
operatorstringYesOperator slug (= InfluxDB database name)
queriesstringYesJSON array of 2-10 InfluxQL GROUP BY time() queries

Example arguments

Illustrative arguments an agent supplies when calling this tool:

{
  "operator": "string",
  "queries": "string"
}

Description

Did they change at the same time? Does one cause the other?

Provide 2-10 InfluxQL GROUP BY time() queries. Results include per-query health summaries and pairwise correlation with statistical significance.

3 analysis modes (--mode):
- quick (default): pairwise Spearman/Pearson + p-values. Fast, answers "are they correlated?"
- full: adds distribution shift detection (KS test) and lag scan (±50 steps). Answers "did they change together?" and "does one cause the other?"
- shift: per-query KS distribution shift only. Answers "which metrics changed recently?"

Use matching GROUP BY time() intervals for best alignment. Prerequisite: discover schema with query_metrics SHOW MEASUREMENTS first.

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