mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
fix(docs): correct malformed YAML keys in sample-config.yaml
Replace double quotes with single quotes in metricsQuery to avoid parsing errors.
This commit is contained in:
parent
01919d0ef1
commit
fcb86e7a52
1 changed files with 3 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ rules:
|
||||||
# This is a Go template where the `.Series` and `.LabelMatchers` string values
|
# This is a Go template where the `.Series` and `.LabelMatchers` string values
|
||||||
# are available, and the delimiters are `<<` and `>>` to avoid conflicts with
|
# are available, and the delimiters are `<<` and `>>` to avoid conflicts with
|
||||||
# the prometheus query language
|
# the prometheus query language
|
||||||
metricsQuery: "sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[2m])) by (<<.GroupBy>>)"
|
metricsQuery: 'sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[2m])) by (<<.GroupBy>>)'
|
||||||
|
|
||||||
# this rule matches cumulative cAdvisor metrics not measured in seconds
|
# this rule matches cumulative cAdvisor metrics not measured in seconds
|
||||||
- seriesQuery: '{__name__=~"^container_.*_total",container!="POD",namespace!="",pod!=""}'
|
- seriesQuery: '{__name__=~"^container_.*_total",container!="POD",namespace!="",pod!=""}'
|
||||||
|
|
@ -39,7 +39,7 @@ rules:
|
||||||
# since this is a superset of the query above, we introduce an additional filter here
|
# since this is a superset of the query above, we introduce an additional filter here
|
||||||
- isNot: "^container_.*_seconds_total$"
|
- isNot: "^container_.*_seconds_total$"
|
||||||
name: {matches: "^container_(.*)_total$"}
|
name: {matches: "^container_(.*)_total$"}
|
||||||
metricsQuery: "sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[2m])) by (<<.GroupBy>>)"
|
metricsQuery: 'sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[2m])) by (<<.GroupBy>>)'
|
||||||
|
|
||||||
# this rule matches cumulative non-cAdvisor metrics
|
# this rule matches cumulative non-cAdvisor metrics
|
||||||
- seriesQuery: '{namespace!="",__name__!="^container_.*"}'
|
- seriesQuery: '{namespace!="",__name__!="^container_.*"}'
|
||||||
|
|
@ -52,7 +52,7 @@ rules:
|
||||||
# Group will be converted to a form acceptible for use as a label automatically.
|
# Group will be converted to a form acceptible for use as a label automatically.
|
||||||
template: "<<.Resource>>"
|
template: "<<.Resource>>"
|
||||||
# if we wanted to, we could also specify overrides here
|
# if we wanted to, we could also specify overrides here
|
||||||
metricsQuery: "sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[2m])) by (<<.GroupBy>>)"
|
metricsQuery: 'sum(rate(<<.Series>>{<<.LabelMatchers>>,container!="POD"}[2m])) by (<<.GroupBy>>)'
|
||||||
|
|
||||||
# this rule matches only a single metric, explicitly naming it something else
|
# this rule matches only a single metric, explicitly naming it something else
|
||||||
# It's series query *must* return only a single metric family
|
# It's series query *must* return only a single metric family
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue