diff --git a/collector/net.go b/collector/net.go index cce16f66..9f5ae06f 100644 --- a/collector/net.go +++ b/collector/net.go @@ -33,6 +33,7 @@ type NetworkCollector struct { BytesReceivedTotal *prometheus.Desc BytesSentTotal *prometheus.Desc BytesTotal *prometheus.Desc + OutputQueueLength *prometheus.Desc PacketsOutboundDiscarded *prometheus.Desc PacketsOutboundErrors *prometheus.Desc PacketsTotal *prometheus.Desc @@ -70,6 +71,12 @@ func NewNetworkCollector() (Collector, error) { []string{"nic"}, nil, ), + OutputQueueLength: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "output_queue_length_packets"), + "(Network.OutputQueueLength)", + []string{"nic"}, + nil, + ), PacketsOutboundDiscarded: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "packets_outbound_discarded_total"), "(Network.PacketsOutboundDiscarded)", @@ -153,6 +160,7 @@ type networkInterface struct { BytesSentPerSec float64 `perflib:"Bytes Sent/sec"` BytesTotalPerSec float64 `perflib:"Bytes Total/sec"` Name string + OutputQueueLength float64 `perflib:"Output Queue Length"` PacketsOutboundDiscarded float64 `perflib:"Packets Outbound Discarded"` PacketsOutboundErrors float64 `perflib:"Packets Outbound Errors"` PacketsPerSec float64 `perflib:"Packets/sec"` @@ -201,6 +209,12 @@ func (c *NetworkCollector) collect(ctx *ScrapeContext, ch chan<- prometheus.Metr nic.BytesTotalPerSec, name, ) + ch <- prometheus.MustNewConstMetric( + c.OutputQueueLength, + prometheus.GaugeValue, + nic.OutputQueueLength, + name, + ) ch <- prometheus.MustNewConstMetric( c.PacketsOutboundDiscarded, prometheus.CounterValue, diff --git a/docs/collector.net.md b/docs/collector.net.md index 872820b6..0eb8feb5 100644 --- a/docs/collector.net.md +++ b/docs/collector.net.md @@ -26,6 +26,7 @@ Name | Description | Type | Labels `windows_net_bytes_received_total` | Total bytes received by interface | counter | `nic` `windows_net_bytes_sent_total` | Total bytes transmitted by interface | counter | `nic` `windows_net_bytes_total` | Total bytes received and transmitted by interface | counter | `nic` +`windows_net_output_queue_length_packets` | Length of the output packet queue (in packets). If this is longer than 2, delays occur. | gauge | `nic` `windows_net_packets_outbound_discarded_total` | Total outbound packets that were chosen to be discarded even though no errors had been detected to prevent transmission | counter | `nic` `windows_net_packets_outbound_errors_total` | Total packets that could not be transmitted due to errors | counter | `nic` `windows_net_packets_received_discarded_total` | Total inbound packets that were chosen to be discarded even though no errors had been detected to prevent delivery | counter | `nic` diff --git a/tools/e2e-output.txt b/tools/e2e-output.txt index 6f5a8e58..7bed991c 100644 --- a/tools/e2e-output.txt +++ b/tools/e2e-output.txt @@ -95,6 +95,8 @@ windows_exporter_collector_timeout{collector="textfile"} 0 # TYPE windows_net_bytes_sent_total counter # HELP windows_net_bytes_total (Network.BytesTotalPerSec) # TYPE windows_net_bytes_total counter +# HELP windows_net_output_queue_length_packets (Network.OutputQueueLength) +# TYPE windows_net_output_queue_length_packets gauge # HELP windows_net_current_bandwidth_bytes (Network.CurrentBandwidth) # TYPE windows_net_current_bandwidth_bytes gauge # HELP windows_net_packets_outbound_discarded_total (Network.PacketsOutboundDiscarded)