Node exporter configuration
From wikinotes
Documentation
github https://github.com/prometheus/node_exporter disabled collectors https://github.com/prometheus/node_exporter#disabled-by-default metric-value exposition formats https://prometheus.io/docs/instrumenting/exposition_formats/
Disabled Collectors
Textfile Collectors
Run a batch job that dumps metrics to a file, and configure the node-exporter to expose it.
Define a collector directory, and*.prom
files will be exposed with the node metrics.
When your service starts node_exporter, ensure it sets a collector.textfile.directorynode_exporter --collector.textfile.directory=/path/to/textfiles-dirAfterwards, simply copy
*.prom
files to it, to expose their metrics.
It is safest to copy after the file has finished being written successfully.echo "current_time $(date +%s)" > /var/tmp/current_time.prom mv /var/tmp/current_time.prom /path/to/textfiles-dir/current_time.promMetrics are expressed using exposition formats.
All metric values must be numeric.
WARNING:
You cannot push the same metric to multiple
.prom
files.