Skip to content
Snippets Groups Projects
Commit 2857ac04 authored by František Řezníček's avatar František Řezníček
Browse files

docs: added basic chapters

parent a2abe5a0
No related branches found
No related tags found
No related merge requests found
Pipeline #92980 passed
# custom-metrics-generator # custom-metrics-generator
Pluggable cron-like prometheus textform metrics generator for node-exporter textfile collector. Pluggable cron-like prometheus textform metrics generator for node-exporter textfile collector.
\ No newline at end of file
## Use-case
Each node may need to export custom runtime metrics like:
* S.M.A.R.T. disk statistics
* puppet state
* container restarts
* node role
Those metrics are generated by jobs (scripts) and text-file metrics representation is then fed to [Prometheus node-exporter](https://github.com/prometheus/node_exporter) which is able to periodically read text-file metrics using its [textfile collector](https://www.robustperception.io/using-the-textfile-collector-from-a-shell-script).
This approach allows add export custom metrics to node-exporter.
Although every custom metrics may have its dedicated prometheus exporter, [Prometheus node-exporter textfile collector](https://www.robustperception.io/using-the-textfile-collector-from-a-shell-script) approach helps to reduce and maintain reasonable number of prometheus targets.
### How to run custom-metrics-generator
```sh
docker run -it --rm --privileged \
-v /var/run/docker.sock:/var/run/docker.sock
-v /etc/node-exporter/node-role.prom:/etc/node-exporter/node-role.prom:ro
-v /opt/puppetlabs/puppet/cache/state/last_run_summary.yaml:/var/lib/puppet/state/last_run_summary.yaml:ro \
-v /var/run/node-exporter:/opt/custom-metrics-generator/out-metric-dir \
-e 'CMG_EXEC_MODULES=smartmon dockermon puppetmon noderolemon' \
registry.gitlab.ics.muni.cz:443/cloud/custom-metrics-generator:latest
```
### Debugging
TODO
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment