diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -107,6 +107,39 @@ echo 'role{role="application_server"} 1' > /path/to/directory/role.prom.$$ | |||
107 | mv /path/to/directory/role.prom.$$ /path/to/directory/role.prom | 107 | mv /path/to/directory/role.prom.$$ /path/to/directory/role.prom |
108 | ``` | 108 | ``` |
109 | 109 | ||
110 | ### Filtering enabled collectors | ||
111 | |||
112 | The 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. | ||
113 | |||
114 | This can be useful for specifying different scrape intervals for different collectors in Prometheus: | ||
115 | |||
116 | ```yaml | ||
117 | scrape_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 | ``` | ||
142 | |||
110 | ## Building and running | 143 | ## Building and running |
111 | 144 | ||
112 | Prerequisites: | 145 | Prerequisites: |