Skip to content

Commit

Permalink
Merge pull request #393 from breed808/net_gauge
Browse files Browse the repository at this point in the history
Set current_bandwidth to gauge type
  • Loading branch information
carlpett authored Aug 28, 2019
2 parents 26a468f + 2c155a1 commit 3a19fe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion collector/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion docs/collector.net.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a19fe4

Please sign in to comment.