node_exporter/collector/fixtures/ethtool/eth0
Benjamin Drung d85cbaa17c
ethtool: Prevent duplicate metric names (#2187)
Sanitizing the metric names can lead to duplicate metric names:

```
caller=level.go:63 level=error caller="error gathering metrics: [from Gatherer #2] collected metric \"node_ethtool_giant_hdr\" { label:<name:\"device\" value:\"ens192\" > untyped:<value:0" msg=" > } was collected before with the same name and label values"
```

Generate a map from the sanitized metric names to the metric names from
ethtool. In case of duplicate sanitized metric names drop both metrics,
because it is unknown which one to take.

Fixes: https://github.com/prometheus/node_exporter/issues/2185
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-11-15 11:22:36 +01:00
..
driver ethtool: Expose node_ethtool_info metric 2021-08-16 16:09:35 +02:00
settings ethtool: add newline to settings fixture. 2021-10-20 19:11:30 +02:00
statistics ethtool: Prevent duplicate metric names (#2187) 2021-11-15 11:22:36 +01:00