mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
ethtool: Use prometheus.BuildFQName
Use `prometheus.BuildFQName` everywhere in `ethtool` instead of hard-coding the metric names. Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
This commit is contained in:
parent
3afd382e75
commit
4356c09ebd
|
@ -78,37 +78,37 @@ func makeEthtoolCollector(logger log.Logger) (*ethtoolCollector, error) {
|
|||
stats: ðtoolStats{},
|
||||
entries: map[string]*prometheus.Desc{
|
||||
"rx_bytes": prometheus.NewDesc(
|
||||
"node_ethtool_received_bytes_total",
|
||||
prometheus.BuildFQName(namespace, "ethtool", "received_bytes_total"),
|
||||
"Network interface bytes received",
|
||||
[]string{"device"}, nil,
|
||||
),
|
||||
"rx_dropped": prometheus.NewDesc(
|
||||
"node_ethtool_received_dropped_total",
|
||||
prometheus.BuildFQName(namespace, "ethtool", "received_dropped_total"),
|
||||
"Number of received frames dropped",
|
||||
[]string{"device"}, nil,
|
||||
),
|
||||
"rx_errors": prometheus.NewDesc(
|
||||
"node_ethtool_received_errors_total",
|
||||
prometheus.BuildFQName(namespace, "ethtool", "received_errors_total"),
|
||||
"Number of received frames with errors",
|
||||
[]string{"device"}, nil,
|
||||
),
|
||||
"rx_packets": prometheus.NewDesc(
|
||||
"node_ethtool_received_packets_total",
|
||||
prometheus.BuildFQName(namespace, "ethtool", "received_packets_total"),
|
||||
"Network interface packets received",
|
||||
[]string{"device"}, nil,
|
||||
),
|
||||
"tx_bytes": prometheus.NewDesc(
|
||||
"node_ethtool_transmitted_bytes_total",
|
||||
prometheus.BuildFQName(namespace, "ethtool", "transmitted_bytes_total"),
|
||||
"Network interface bytes sent",
|
||||
[]string{"device"}, nil,
|
||||
),
|
||||
"tx_errors": prometheus.NewDesc(
|
||||
"node_ethtool_transmitted_errors_total",
|
||||
prometheus.BuildFQName(namespace, "ethtool", "transmitted_errors_total"),
|
||||
"Number of sent frames with errors",
|
||||
[]string{"device"}, nil,
|
||||
),
|
||||
"tx_packets": prometheus.NewDesc(
|
||||
"node_ethtool_transmitted_packets_total",
|
||||
prometheus.BuildFQName(namespace, "ethtool", "transmitted_packets_total"),
|
||||
"Network interface packets sent",
|
||||
[]string{"device"}, nil,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue