Skip to content

Commit a264364

Browse files
jkohenStevenYCChou
authored andcommitted
Clarified escaping for filters (#116)
This came up several times, including #115.
1 parent a9aa4eb commit a264364

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ stackdriver-prometheus-sidecar --help
5151
The `--filter` flag allows to provide filters which all series have to pass before being sent to Stackdriver. The flag may be repeated to provide several filters. Filters use the same syntax as the well-known PromQL label matchers, e.g.:
5252

5353
```
54-
stackdriver-prometheus-sidecar --filter='job="k8s"' --filter='__name__!~"cadvisor_.+"' ...
54+
stackdriver-prometheus-sidecar --filter=job="k8s" --filter=__name__!~"cadvisor_.+" ...
5555
```
5656

5757
This drops all series which do not have a `job` label `k8s` and all metrics that have a name starting with `cadvisor_`.
5858

59+
Note: On the command-line shell you may need to escape filters as `--filter='job="k8s"'`.
60+
5961
#### File
6062

6163
The sidecar can also be provided with a configuration file. It allows to define static metric renames and to overwrite metric metadata which is usually provided by Prometheus. A configuration file should not be required for the majority of users.

0 commit comments

Comments
 (0)