node_exporter/text_collector_examples
Andreas Wirooks 3ca212f55e Handle 'Unknown' as measurement value. (#1113)
We use the output-compatible perccli and storcli.py does not handle 'Unknown' as a result:
```
sg="Error parsing \"/var/lib/node_exporter/perccli.prom\": text format parsing error in line 222: expected float as value, got \"Unknown\"" source="textfile.go:212"
```
I know, the perccli should not return 'Unknown' but this error breaks all other useful measurements because the prom file is not parsable. My if condition fixes this.

Signed-off-by: Andreas Wirooks <4233401+nudgegoonies@users.noreply.github.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 16:48:13 +01:00
..
README.md Note how to get moreutils on FreeBSD (#1073) 2018-09-14 14:14:45 +02:00
apt.sh Fix apt.sh syntax (#811) 2018-02-05 20:43:25 +01:00
deleted_libraries.py Add metric for outdated libraries (#957) 2018-05-25 18:20:42 +02:00
directory-size.sh Fix metric name in directory size text collector example 2018-05-19 21:11:46 +02:00
ipmitool Fix spelling of celsius in IPMI example script (#967) 2018-06-08 19:21:19 +02:00
md_info.sh Add metrics exposing extended md RAID info (#958) 2018-08-18 08:57:51 +00:00
ntpd_metrics.py Add ntpd metrics from ntpq rv 2017-02-14 16:20:53 +01:00
smartmon.sh textfile example script rework (#1074) 2018-09-18 22:43:20 +02:00
storcli.py Handle 'Unknown' as measurement value. (#1113) 2018-11-30 16:48:13 +01:00

README.md

Text collector example scripts

These scripts are examples to be used with the Node Exporter Textfile Collector.

To use these scripts, we recommend using a sponge to atomically write the output.

<collector_script> | sponge <output_file>

Sponge comes from moreutils

For more information see: https://github.com/prometheus/node_exporter#textfile-collector