aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBen Kochie <superq@gmail.com>2018-01-10 15:16:33 +0100
committerGitHub <noreply@github.com>2018-01-10 15:16:33 +0100
commitbc38ffc538b1683ca033790c80fa163e975698a5 (patch)
treed81723de891a6f4237720e36a1607b48b3e8c8db /README.md
parent8d3484d0ca8c1c995e73c270de1a89cf3f26adf0 (diff)
downloadprometheus_node_collector-bc38ffc538b1683ca033790c80fa163e975698a5.tar.bz2
prometheus_node_collector-bc38ffc538b1683ca033790c80fa163e975698a5.tar.xz
prometheus_node_collector-bc38ffc538b1683ca033790c80fa163e975698a5.zip
Update collect[] param documentation (#784)
Improve recommendations and wording around advanced use of the collect[] param. Remove example that causes users to copy-and-paste it.
Diffstat (limited to 'README.md')
-rw-r--r--README.md40
1 files changed, 11 insertions, 29 deletions
diff --git a/README.md b/README.md
index 7bb83a5..ca13917 100644
--- a/README.md
+++ b/README.md
@@ -109,36 +109,18 @@ mv /path/to/directory/role.prom.$$ /path/to/directory/role.prom
109 109
110### Filtering enabled collectors 110### Filtering enabled collectors
111 111
112The node_exporter will expose all metrics from enabled collectors by default, but it can be passed an optional list of collectors to filter metrics. The `collect[]` parameter accepts values matching enabled collector names. 112The `node_exporter` will expose all metrics from enabled collectors by default. This is the recommended way to collect metrics to avoid errors when comparing metrics of different familes.
113 113
114This can be useful for specifying different scrape intervals for different collectors in Prometheus: 114For advanced use the `node_exporter` can be passed an optional list of collectors to filter metrics. The `collect[]` parameter may be used multiple times. In Prometheus configuration you can use this syntax under the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<scrape_config>).
115 115
116```yaml
117scrape_configs:
118 - job_name: 'node resources'
119 scrape_interval: 15s
120 static_configs:
121 - targets:
122 - '192.168.1.2:9100'
123 params:
124 collect[]:
125 - cpu
126 - meminfo
127 - diskstats
128 - netdev
129 - netstat
130
131 - job_name: 'node storage'
132 scrape_interval: 1m
133 static_configs:
134 - targets:
135 - '192.168.1.2:9100'
136 params:
137 collect[]:
138 - filefd
139 - filesystem
140 - xfs
141``` 116```
117 params:
118 collect[]:
119 - foo
120 - bar
121```
122
123This can be useful for having different Prometheus servers collect specific metrics from nodes.
142 124
143## Building and running 125## Building and running
144 126