mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-24 13:46:36 +00:00
rename some metrics that maybe misleading
This commit is contained in:
@@ -301,68 +301,68 @@ func NewHyperVCollector() (Collector, error) {
|
|||||||
|
|
||||||
//
|
//
|
||||||
BroadcastPacketsReceivedPersec: prometheus.NewDesc(
|
BroadcastPacketsReceivedPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "broadcast_packets_received_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "broadcast_packets_received_total_persec"),
|
||||||
"This counter represents the total number of broadcast packets received per second by the virtual switch",
|
"This represents the total number of broadcast packets received per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
BroadcastPacketsSentPersec: prometheus.NewDesc(
|
BroadcastPacketsSentPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "broadcast_packets_sent_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "broadcast_packets_sent_total_persec"),
|
||||||
"This counter represents the total number of broadcast packets sent per second by the virtual switch",
|
"This represents the total number of broadcast packets sent per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
BytesPersec: prometheus.NewDesc(
|
BytesPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "bytes_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "bytes_total_persec"),
|
||||||
"This counter represents the total number of bytes per second traversing the virtual switch",
|
"This represents the total number of bytes per second traversing the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
BytesReceivedPersec: prometheus.NewDesc(
|
BytesReceivedPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "bytes_received_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "bytes_received_total_persec"),
|
||||||
"This counter represents the total number of bytes received per second by the virtual switch",
|
"This represents the total number of bytes received per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
BytesSentPersec: prometheus.NewDesc(
|
BytesSentPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "bytes_sent_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "bytes_sent_total_persec"),
|
||||||
"This counter represents the total number of bytes sent per second by the virtual switch",
|
"This represents the total number of bytes sent per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
DirectedPacketsReceivedPersec: prometheus.NewDesc(
|
DirectedPacketsReceivedPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "directed_packets_received_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "directed_packets_received_total_persec"),
|
||||||
"This counter represents the total number of directed packets received per second by the virtual switch",
|
"This represents the total number of directed packets received per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
DirectedPacketsSentPersec: prometheus.NewDesc(
|
DirectedPacketsSentPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "directed_packets_send_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "directed_packets_send_total_persec"),
|
||||||
"This counter represents the total number of directed packets sent per second by the virtual switch",
|
"This represents the total number of directed packets sent per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
DroppedPacketsIncomingPersec: prometheus.NewDesc(
|
DroppedPacketsIncomingPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "dropped_packets_incoming_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "dropped_packets_incoming_total_persec"),
|
||||||
"This counter represents the total number of packet dropped per second by the virtual switch in the incoming direction",
|
"This represents the total number of packet dropped per second by the virtual switch in the incoming direction",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
DroppedPacketsOutgoingPersec: prometheus.NewDesc(
|
DroppedPacketsOutgoingPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "dropped_packets_outcoming_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "dropped_packets_outcoming_total_persec"),
|
||||||
"This counter represents the total number of packet dropped per second by the virtual switch in the outgoing direction",
|
"This represents the total number of packet dropped per second by the virtual switch in the outgoing direction",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
ExtensionsDroppedPacketsIncomingPersec: prometheus.NewDesc(
|
ExtensionsDroppedPacketsIncomingPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "extensions_dropped_packets_incoming_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "extensions_dropped_packets_incoming_total_persec"),
|
||||||
"This counter represents the total number of packet dropped per second by the virtual switch extensions in the incoming direction",
|
"This represents the total number of packet dropped per second by the virtual switch extensions in the incoming direction",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
ExtensionsDroppedPacketsOutgoingPersec: prometheus.NewDesc(
|
ExtensionsDroppedPacketsOutgoingPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "extensions_dropped_packets_outcoming_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "extensions_dropped_packets_outcoming_total_persec"),
|
||||||
"This counter represents the total number of packet dropped per second by the virtual switch extensions in the outgoing direction",
|
"This represents the total number of packet dropped per second by the virtual switch extensions in the outgoing direction",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
@@ -373,32 +373,32 @@ func NewHyperVCollector() (Collector, error) {
|
|||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
LearnedMacAddressesPersec: prometheus.NewDesc(
|
LearnedMacAddressesPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "learned_mac_addresses_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "learned_mac_addresses_total_persec"),
|
||||||
"This counter represents the total number MAC addresses learned per second by the virtual switch",
|
"This represents the total number MAC addresses learned per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
MulticastPacketsReceivedPersec: prometheus.NewDesc(
|
MulticastPacketsReceivedPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "multicast_packets_received_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "multicast_packets_received_total_persec"),
|
||||||
"This counter represents the total number of multicast packets received per second by the virtual switch",
|
"This represents the total number of multicast packets received per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
MulticastPacketsSentPersec: prometheus.NewDesc(
|
MulticastPacketsSentPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "multicast_packets_sent_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "multicast_packets_sent_total_persec"),
|
||||||
"This counter represents the total number of multicast packets sent per second by the virtual switch",
|
"This represents the total number of multicast packets sent per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
NumberofSendChannelMovesPersec: prometheus.NewDesc(
|
NumberofSendChannelMovesPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "number_of_send_channel_moves_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "number_of_send_channel_moves_total_persec"),
|
||||||
"This counter represents the total number of send channel moves per second on this virtual switch",
|
"This represents the total number of send channel moves per second on this virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
NumberofVMQMovesPersec: prometheus.NewDesc(
|
NumberofVMQMovesPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "number_of_vmq_moves_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "number_of_vmq_moves_total_persec"),
|
||||||
"This counter represents the total number of VMQ moves per second on this virtual switch",
|
"This represents the total number of VMQ moves per second on this virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
@@ -409,26 +409,26 @@ func NewHyperVCollector() (Collector, error) {
|
|||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
PacketsFloodedPersec: prometheus.NewDesc(
|
PacketsFloodedPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "packets_flooded_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "packets_flooded_total_persec"),
|
||||||
"This counter represents the total number of packets flooded per second by the virtual switch",
|
"This represents the total number of packets flooded per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
PacketsPersec: prometheus.NewDesc(
|
PacketsPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "packets_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "packets_total_persec"),
|
||||||
"This counter represents the total number of packets per second traversing the virtual switch",
|
"This represents the total number of packets per second traversing the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
PacketsReceivedPersec: prometheus.NewDesc(
|
PacketsReceivedPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "packets_received_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "packets_received_total_persec"),
|
||||||
"This counter represents the total number of packets received per second by the virtual switch",
|
"This represents the total number of packets received per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
PacketsSentPersec: prometheus.NewDesc(
|
PacketsSentPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "packets_sent_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "packets_sent_total_persec"),
|
||||||
"This counter represents the total number of packets send per second by the virtual switch",
|
"This represents the total number of packets send per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
@@ -439,8 +439,8 @@ func NewHyperVCollector() (Collector, error) {
|
|||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
PurgedMacAddressesPersec: prometheus.NewDesc(
|
PurgedMacAddressesPersec: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, "switch", "purged_mac_addresses_persec"),
|
prometheus.BuildFQName(Namespace, "switch", "purged_mac_addresses_total_persec"),
|
||||||
"This counter represents the total number MAC addresses purged per second by the virtual switch",
|
"This represents the total number MAC addresses purged per second by the virtual switch",
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
@@ -949,7 +949,7 @@ func (c *HyperVCollector) collectVmSwitch(ch chan<- prometheus.Metric) (*prometh
|
|||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.LearnedMacAddresses,
|
c.LearnedMacAddresses,
|
||||||
prometheus.GaugeValue,
|
prometheus.CounterValue,
|
||||||
float64(obj.LearnedMacAddresses),
|
float64(obj.LearnedMacAddresses),
|
||||||
)
|
)
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
@@ -981,7 +981,7 @@ func (c *HyperVCollector) collectVmSwitch(ch chan<- prometheus.Metric) (*prometh
|
|||||||
// ...
|
// ...
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.PacketsFlooded,
|
c.PacketsFlooded,
|
||||||
prometheus.GaugeValue,
|
prometheus.CounterValue,
|
||||||
float64(obj.PacketsFlooded),
|
float64(obj.PacketsFlooded),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1004,7 +1004,7 @@ func (c *HyperVCollector) collectVmSwitch(ch chan<- prometheus.Metric) (*prometh
|
|||||||
)
|
)
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.PurgedMacAddresses,
|
c.PurgedMacAddresses,
|
||||||
prometheus.GaugeValue,
|
prometheus.CounterValue,
|
||||||
float64(obj.PurgedMacAddresses),
|
float64(obj.PurgedMacAddresses),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user