Set current_bandwidth to gauge type

Bandwidth estimate for an interface may decrease or increase
This commit is contained in:
Ben Reedy 2019-08-28 21:12:14 +10:00
parent a7b5cf7aa6
commit 2c155a12bd
No known key found for this signature in database
GPG Key ID: 235C15B6086C9D7E
2 changed files with 2 additions and 2 deletions

View File

@ -252,7 +252,7 @@ func (c *NetworkCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Des
)
ch <- prometheus.MustNewConstMetric(
c.CurrentBandwidth,
prometheus.CounterValue,
prometheus.GaugeValue,
float64(nic.CurrentBandwidth),
name,
)

View File

@ -33,7 +33,7 @@ Name | Description | Type | Labels
`wmi_net_packets_received_unknown` | Total packets received by interface that were discarded because of an unknown or unsupported protocol | counter | `nic`
`wmi_net_packets_total` | Total packets received and transmitted by interface | counter | `nic`
`wmi_net_packets_sent_total` | Total packets transmitted by interface | counter | `nic`
`wmi_net_current_bandwidth` | Estimate of the interface's current bandwidth in bits per second (bps) | counter | `nic`
`wmi_net_current_bandwidth` | Estimate of the interface's current bandwidth in bits per second (bps) | gauge | `nic`
### Example metric
Query the rate of transmitted network traffic