From f88a0a7d83bb9ef4387ff158d43f5a0c580fffdf Mon Sep 17 00:00:00 2001 From: Sam Jewell <2903904+samjewell@users.noreply.github.com> Date: Tue, 10 Jan 2023 00:36:07 +0000 Subject: [PATCH] Update example rules file to be valid with the default scrape config (#11692) * Update docs example rules for default config The prometheus download includes a default config to scrape itself. This self-scraping prometheus doesn't include any metric named as `http_inprogress_requests`, but does include one named `prometheus_http_requests_total`. Updating this example rule in the docs to one which can be used out-of-the-box with the default download would be a nice improvement. Signed-off-by: Sam Jewell * Update syntax as per @LeviHarrison's review Co-authored-by: Levi Harrison Signed-off-by: Sam Jewell <2903904+samjewell@users.noreply.github.com> Signed-off-by: Sam Jewell Signed-off-by: Sam Jewell <2903904+samjewell@users.noreply.github.com> Co-authored-by: Levi Harrison --- docs/configuration/recording_rules.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration/recording_rules.md b/docs/configuration/recording_rules.md index 60ba67d1f..7c10971a4 100644 --- a/docs/configuration/recording_rules.md +++ b/docs/configuration/recording_rules.md @@ -70,8 +70,8 @@ A simple example rules file would be: groups: - name: example rules: - - record: job:http_inprogress_requests:sum - expr: sum by (job) (http_inprogress_requests) + - record: code:prometheus_http_requests_total:sum + expr: sum by (code) (prometheus_http_requests_total) ``` ### ``