Skip to content

Add opt-in 7-day CPU/heap trend summary from monitoring data - #1049

Open
ash9146 wants to merge 1 commit into
elastic:mainfrom
ash9146:add-monitoring-trends
Open

Add opt-in 7-day CPU/heap trend summary from monitoring data#1049
ash9146 wants to merge 1 commit into
elastic:mainfrom
ash9146:add-monitoring-trends

Conversation

@ash9146

@ash9146 ash9146 commented Jul 29, 2026

Copy link
Copy Markdown

Closes #1048

Changes

  • New CollectMonitoringTrends command, gated behind --includeTrends
    (opt-in, default off)
  • Queries .monitoring-es-* for a 7-day CPU/heap percentile summary
    (p50/p95/p99), broken down by node and by day
  • Filtered on type: node_stats to avoid scanning unrelated monitoring
    doc types — verified this reduced scanned docs from ~10M/node to
    ~55k/node over 7 days
  • Gracefully skips (no error, rest of diagnostic proceeds) if monitoring
    indices aren't present, or if the query fails/times out (10s timeout)
  • Scoped to legacy self-monitoring indices; 8.x Metricbeat-based
    monitoring data streams use a different schema and aren't covered yet

Testing

Manually verified against a running cluster:

See #1048 for full design discussion.

Point-in-time snapshots of CPU/heap usage don't show whether a cluster
has been trending toward trouble, which limits their usefulness for
after-the-fact investigations. This adds an opt-in --includeTrends flag
that queries .monitoring-es-* (when present) for a 7-day percentile
summary (p50/p95/p99) of CPU and heap usage, broken down both as an
overall summary and daily buckets, written to monitoring-trends.json.

Filters on type: node_stats to avoid scanning unrelated monitoring doc
types sharing the same source_node.name field - verified this brought
scanned docs from ~10M/node down to ~55k/node over 7 days on a test
cluster, in line with the expected count at a 10s collection interval.

Scoped to legacy self-monitoring indices for now; 8.x Metricbeat-based
monitoring data streams use a different schema and aren't covered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add opt-in CPU/heap trend summary from monitoring data (7-day avg/p95/p99, daily breakdown)

1 participant