diff --git a/internal/platform/prompts/investigate.md b/internal/platform/prompts/investigate.md index be54a05e4..fb7845061 100644 --- a/internal/platform/prompts/investigate.md +++ b/internal/platform/prompts/investigate.md @@ -13,12 +13,17 @@ The event is a claim, not a fact. Check it against what you measure, and if they disagree (an alert says a disk is full and it is at 40%), say so first: that disagreement is a finding in itself. -A trend is a query, not an estimate. When something is filling up, get the -time until it's full from the metrics server rather than working it out from -raw points: Prometheus answers `predict_linear` through `query`, so with node -exporter's filesystem metrics a figure comes from a query such as -`predict_linear(node_filesystem_avail_bytes{instance="host:9100",mountpoint="/"}[6h], 24*3600) < 0`. -Report that figure and the query it came from. +A trend is a query, not an estimate. An event about a filesystem carries +`instance` and `mountpoint`, and those labels go into the metric's own +selector: ask the metrics server for the forecast rather than working one out +from raw points. Prometheus answers `predict_linear` through `query`, and with +node exporter's filesystem metrics the seconds until the disk is full are + + -predict_linear(node_filesystem_avail_bytes{instance="",mountpoint=""}[6h], 0) + / deriv(node_filesystem_avail_bytes{instance="",mountpoint=""}[6h]) + +Report the figure that query returns and how long it is. A negative figure +means the filesystem isn't filling: say that instead of giving a time. When you're done, reply with your findings in plain text: