From dde839b66d3ebd1ace3ab1f93ac7920f45f3e440 Mon Sep 17 00:00:00 2001 From: Tom Powell Date: Wed, 30 Mar 2022 09:45:02 +0100 Subject: [PATCH 1/3] Adding Teradici PCoIP session metrics collection Signed-off-by: Tom Powell Added collector for VMware Blast session metrics Signed-off-by: Tom Powell Updating collection logic to handle missing WMI classes Signed-off-by: Tom Powell Updating packet loss metric to gauge Signed-off-by: Tom Powell --- README.md | 2 + collector/teradici_pcoip.go | 665 +++++++++++++++ collector/teradici_pcoip_test.go | 9 + collector/vmware_blast.go | 1296 ++++++++++++++++++++++++++++++ collector/vmware_blast_test.go | 9 + docs/collector.teradici_pcoip.md | 64 ++ docs/collector.vmware_blast.md | 98 +++ 7 files changed, 2143 insertions(+) create mode 100644 collector/teradici_pcoip.go create mode 100644 collector/teradici_pcoip_test.go create mode 100644 collector/vmware_blast.go create mode 100644 collector/vmware_blast_test.go create mode 100644 docs/collector.teradici_pcoip.md create mode 100644 docs/collector.vmware_blast.md diff --git a/README.md b/README.md index c14b86e6..7869e2f2 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,12 @@ Name | Description | Enabled by default [smtp](docs/collector.smtp.md) | IIS SMTP Server | [system](docs/collector.system.md) | System calls | ✓ [tcp](docs/collector.tcp.md) | TCP connections | +[teradici_pcoip](docs/collector.teradici_pcoip.md) | [Teradici PCoIP](https://www.teradici.com/web-help/pcoip_wmi_specs/) session metrics | [time](docs/collector.time.md) | Windows Time Service | [thermalzone](docs/collector.thermalzone.md) | Thermal information [terminal_services](docs/collector.terminal_services.md) | Terminal services (RDS) [textfile](docs/collector.textfile.md) | Read prometheus metrics from a text file | ✓ +[vmware_blast](docs/collector.vmware_blast.md) | VMware Blast session metrics | [vmware](docs/collector.vmware.md) | Performance counters installed by the Vmware Guest agent | See the linked documentation on each collector for more information on reported metrics, configuration settings and usage examples. diff --git a/collector/teradici_pcoip.go b/collector/teradici_pcoip.go new file mode 100644 index 00000000..0ee230ac --- /dev/null +++ b/collector/teradici_pcoip.go @@ -0,0 +1,665 @@ +//go:build windows +// +build windows + +package collector + +import ( + "errors" + + "github.com/StackExchange/wmi" + "github.com/prometheus-community/windows_exporter/log" + "github.com/prometheus/client_golang/prometheus" +) + +func init() { + registerCollector("teradici_pcoip", NewTeradiciPcoipCollector) +} + +// A TeradiciPcoipCollector is a Prometheus collector for WMI metrics: +// Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics +// Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics +// Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics +// Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics +// Win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics + +type TeradiciPcoipCollector struct { + AudioBytesReceived *prometheus.Desc + AudioBytesSent *prometheus.Desc + AudioRXBWkbitPersec *prometheus.Desc + AudioTXBWkbitPersec *prometheus.Desc + AudioTXBWLimitkbitPersec *prometheus.Desc + + BytesReceived *prometheus.Desc + BytesSent *prometheus.Desc + PacketsReceived *prometheus.Desc + PacketsSent *prometheus.Desc + RXPacketsLost *prometheus.Desc + SessionDurationSeconds *prometheus.Desc + TXPacketsLost *prometheus.Desc + + ImagingActiveMinimumQuality *prometheus.Desc + ImagingApex2800Offload *prometheus.Desc + ImagingBytesReceived *prometheus.Desc + ImagingBytesSent *prometheus.Desc + ImagingDecoderCapabilitykbitPersec *prometheus.Desc + ImagingEncodedFramesPersec *prometheus.Desc + ImagingMegapixelPersec *prometheus.Desc + ImagingNegativeAcknowledgements *prometheus.Desc + ImagingRXBWkbitPersec *prometheus.Desc + ImagingSVGAdevTapframesPersec *prometheus.Desc + ImagingTXBWkbitPersec *prometheus.Desc + + RoundTripLatencyms *prometheus.Desc + RXBWkbitPersec *prometheus.Desc + RXBWPeakkbitPersec *prometheus.Desc + RXPacketLossPercent *prometheus.Desc + RXPacketLossPercent_Base *prometheus.Desc + TXBWActiveLimitkbitPersec *prometheus.Desc + TXBWkbitPersec *prometheus.Desc + TXBWLimitkbitPersec *prometheus.Desc + TXPacketLossPercent *prometheus.Desc + TXPacketLossPercent_Base *prometheus.Desc + + USBBytesReceived *prometheus.Desc + USBBytesSent *prometheus.Desc + USBRXBWkbitPersec *prometheus.Desc + USBTXBWkbitPersec *prometheus.Desc +} + +// NewTeradiciPcoipCollector constructs a new TeradiciPcoipCollector +func NewTeradiciPcoipCollector() (Collector, error) { + const subsystem = "teradici_pcoip" + return &TeradiciPcoipCollector{ + AudioBytesReceived: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_bytes_received"), + "(AudioBytesReceived)", + nil, + nil, + ), + AudioBytesSent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_bytes_sent"), + "(AudioBytesSent)", + nil, + nil, + ), + AudioRXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_rx_bw_kbit_persec"), + "(AudioRXBWkbitPersec)", + nil, + nil, + ), + AudioTXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_tx_bw_kbit_persec"), + "(AudioTXBWkbitPersec)", + nil, + nil, + ), + AudioTXBWLimitkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_tx_bw_limit_kbit_persec"), + "(AudioTXBWLimitkbitPersec)", + nil, + nil, + ), + + BytesReceived: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "bytes_received"), + "(BytesReceived)", + nil, + nil, + ), + BytesSent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "bytes_sent"), + "(BytesSent)", + nil, + nil, + ), + PacketsReceived: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "packets_received"), + "(PacketsReceived)", + nil, + nil, + ), + PacketsSent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "packets_sent"), + "(PacketsSent)", + nil, + nil, + ), + RXPacketsLost: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rx_packets_lost"), + "(RXPacketsLost)", + nil, + nil, + ), + SessionDurationSeconds: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_duration_seconds"), + "(SessionDurationSeconds)", + nil, + nil, + ), + TXPacketsLost: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "tx_packets_lost"), + "(TXPacketsLost)", + nil, + nil, + ), + + ImagingActiveMinimumQuality: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_active_min_quality"), + "(ImagingActiveMinimumQuality)", + nil, + nil, + ), + ImagingApex2800Offload: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_apex2800_offload"), + "(ImagingApex2800Offload)", + nil, + nil, + ), + ImagingBytesReceived: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_bytes_received"), + "(ImagingBytesReceived)", + nil, + nil, + ), + ImagingBytesSent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_bytes_sent"), + "(ImagingBytesSent)", + nil, + nil, + ), + ImagingDecoderCapabilitykbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_decoder_capability_kbit_persec"), + "(ImagingDecoderCapabilitykbitPersec)", + nil, + nil, + ), + ImagingEncodedFramesPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_encoded_frames_persec"), + "(ImagingEncodedFramesPersec)", + nil, + nil, + ), + ImagingMegapixelPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_megapixel_persec"), + "(ImagingMegapixelPersec)", + nil, + nil, + ), + ImagingNegativeAcknowledgements: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_negative_acks"), + "(ImagingNegativeAcknowledgements)", + nil, + nil, + ), + ImagingRXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_rx_bw_kbit_persec"), + "(ImagingRXBWkbitPersec)", + nil, + nil, + ), + ImagingSVGAdevTapframesPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_svga_devtap_frames_persec"), + "(ImagingSVGAdevTapframesPersec)", + nil, + nil, + ), + ImagingTXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_tx_bw_kbit_persec"), + "(ImagingTXBWkbitPersec)", + nil, + nil, + ), + + RoundTripLatencyms: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "round_trip_latency_ms"), + "(RoundTripLatencyms)", + nil, + nil, + ), + RXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rx_bw_kbit_persec"), + "(RXBWkbitPersec)", + nil, + nil, + ), + RXBWPeakkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rx_bw_peak_kbit_persec"), + "(RXBWPeakkbitPersec)", + nil, + nil, + ), + RXPacketLossPercent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rx_packet_loss_percent"), + "(RXPacketLossPercent)", + nil, + nil, + ), + RXPacketLossPercent_Base: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rx_packet_loss_percent_base"), + "(RXPacketLossPercent_Base)", + nil, + nil, + ), + TXBWActiveLimitkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "tx_bw_active_limit_kbit_persec"), + "(TXBWActiveLimitkbitPersec)", + nil, + nil, + ), + TXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "tx_bw_kbit_persec"), + "(TXBWkbitPersec)", + nil, + nil, + ), + TXBWLimitkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "tx_bw_limit_kbit_persec"), + "(TXBWLimitkbitPersec)", + nil, + nil, + ), + TXPacketLossPercent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "tx_packet_loss_percent"), + "(TXPacketLossPercent)", + nil, + nil, + ), + TXPacketLossPercent_Base: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "tx_packet_loss_percent_base"), + "(TXPacketLossPercent_Base)", + nil, + nil, + ), + + USBBytesReceived: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_bytes_received"), + "(USBBytesReceived)", + nil, + nil, + ), + USBBytesSent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_bytes_sent"), + "(USBBytesSent)", + nil, + nil, + ), + USBRXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_rx_bw_kbit_persec"), + "(USBRXBWkbitPersec)", + nil, + nil, + ), + USBTXBWkbitPersec: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_tx_bw_kbit_persec"), + "(USBTXBWkbitPersec)", + nil, + nil, + ), + }, nil +} + +// Collect sends the metric values for each metric +// to the provided prometheus Metric channel. +func (c *TeradiciPcoipCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { + if desc, err := c.collectAudio(ch); err != nil { + log.Error("failed collecting teradici session audio metrics:", desc, err) + return err + } + if desc, err := c.collectGeneral(ch); err != nil { + log.Error("failed collecting teradici session general metrics:", desc, err) + return err + } + if desc, err := c.collectImaging(ch); err != nil { + log.Error("failed collecting teradici session imaging metrics:", desc, err) + return err + } + if desc, err := c.collectNetwork(ch); err != nil { + log.Error("failed collecting teradici session network metrics:", desc, err) + return err + } + if desc, err := c.collectUsb(ch); err != nil { + log.Error("failed collecting teradici session USB metrics:", desc, err) + return err + } + return nil +} + +type Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics struct { + AudioBytesReceived uint64 + AudioBytesSent uint64 + AudioRXBWkbitPersec uint64 + AudioTXBWkbitPersec uint64 + AudioTXBWLimitkbitPersec uint64 +} + +type Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics struct { + BytesReceived uint64 + BytesSent uint64 + PacketsReceived uint64 + PacketsSent uint64 + RXPacketsLost uint64 + SessionDurationSeconds uint64 + TXPacketsLost uint64 +} + +type Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics struct { + ImagingActiveMinimumQuality uint32 + ImagingApex2800Offload uint32 + ImagingBytesReceived uint64 + ImagingBytesSent uint64 + ImagingDecoderCapabilitykbitPersec uint32 + ImagingEncodedFramesPersec uint32 + ImagingMegapixelPersec uint32 + ImagingNegativeAcknowledgements uint32 + ImagingRXBWkbitPersec uint64 + ImagingSVGAdevTapframesPersec uint32 + ImagingTXBWkbitPersec uint64 +} + +type Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics struct { + RoundTripLatencyms uint32 + RXBWkbitPersec uint64 + RXBWPeakkbitPersec uint32 + RXPacketLossPercent uint32 + RXPacketLossPercent_Base uint32 + TXBWActiveLimitkbitPersec uint32 + TXBWkbitPersec uint64 + TXBWLimitkbitPersec uint32 + TXPacketLossPercent uint32 + TXPacketLossPercent_Base uint32 +} + +type Win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics struct { + USBBytesReceived uint64 + USBBytesSent uint64 + USBRXBWkbitPersec uint64 + USBTXBWkbitPersec uint64 +} + +func (c *TeradiciPcoipCollector) collectAudio(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + if len(dst) == 0 { + return nil, errors.New("WMI query returned empty result set") + } + + ch <- prometheus.MustNewConstMetric( + c.AudioBytesReceived, + prometheus.CounterValue, + float64(dst[0].AudioBytesReceived), + ) + + ch <- prometheus.MustNewConstMetric( + c.AudioBytesSent, + prometheus.CounterValue, + float64(dst[0].AudioBytesSent), + ) + + ch <- prometheus.MustNewConstMetric( + c.AudioRXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].AudioRXBWkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.AudioTXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].AudioTXBWkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.AudioTXBWLimitkbitPersec, + prometheus.GaugeValue, + float64(dst[0].AudioTXBWLimitkbitPersec), + ) + + return nil, nil +} + +func (c *TeradiciPcoipCollector) collectGeneral(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + if len(dst) == 0 { + return nil, errors.New("WMI query returned empty result set") + } + + ch <- prometheus.MustNewConstMetric( + c.BytesReceived, + prometheus.CounterValue, + float64(dst[0].BytesReceived), + ) + + ch <- prometheus.MustNewConstMetric( + c.BytesSent, + prometheus.CounterValue, + float64(dst[0].BytesSent), + ) + + ch <- prometheus.MustNewConstMetric( + c.PacketsReceived, + prometheus.CounterValue, + float64(dst[0].PacketsReceived), + ) + + ch <- prometheus.MustNewConstMetric( + c.PacketsSent, + prometheus.CounterValue, + float64(dst[0].PacketsSent), + ) + + ch <- prometheus.MustNewConstMetric( + c.RXPacketsLost, + prometheus.CounterValue, + float64(dst[0].RXPacketsLost), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionDurationSeconds, + prometheus.CounterValue, + float64(dst[0].SessionDurationSeconds), + ) + + ch <- prometheus.MustNewConstMetric( + c.TXPacketsLost, + prometheus.CounterValue, + float64(dst[0].TXPacketsLost), + ) + + return nil, nil +} + +func (c *TeradiciPcoipCollector) collectImaging(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + if len(dst) == 0 { + return nil, errors.New("WMI query returned empty result set") + } + + ch <- prometheus.MustNewConstMetric( + c.ImagingActiveMinimumQuality, + prometheus.GaugeValue, + float64(dst[0].ImagingActiveMinimumQuality), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingApex2800Offload, + prometheus.GaugeValue, + float64(dst[0].ImagingApex2800Offload), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingBytesReceived, + prometheus.CounterValue, + float64(dst[0].ImagingBytesReceived), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingBytesSent, + prometheus.CounterValue, + float64(dst[0].ImagingBytesSent), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingDecoderCapabilitykbitPersec, + prometheus.GaugeValue, + float64(dst[0].ImagingDecoderCapabilitykbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingEncodedFramesPersec, + prometheus.GaugeValue, + float64(dst[0].ImagingEncodedFramesPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingMegapixelPersec, + prometheus.GaugeValue, + float64(dst[0].ImagingMegapixelPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingNegativeAcknowledgements, + prometheus.CounterValue, + float64(dst[0].ImagingNegativeAcknowledgements), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingRXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].ImagingRXBWkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingSVGAdevTapframesPersec, + prometheus.GaugeValue, + float64(dst[0].ImagingSVGAdevTapframesPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingTXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].ImagingTXBWkbitPersec), + ) + + return nil, nil +} + +func (c *TeradiciPcoipCollector) collectNetwork(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + if len(dst) == 0 { + return nil, errors.New("WMI query returned empty result set") + } + + ch <- prometheus.MustNewConstMetric( + c.RoundTripLatencyms, + prometheus.GaugeValue, + float64(dst[0].RoundTripLatencyms), + ) + + ch <- prometheus.MustNewConstMetric( + c.RXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].RXBWkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.RXBWPeakkbitPersec, + prometheus.GaugeValue, + float64(dst[0].RXBWPeakkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.RXPacketLossPercent, + prometheus.GaugeValue, + float64(dst[0].RXPacketLossPercent), + ) + + ch <- prometheus.MustNewConstMetric( + c.RXPacketLossPercent_Base, + prometheus.GaugeValue, + float64(dst[0].RXPacketLossPercent_Base), + ) + + ch <- prometheus.MustNewConstMetric( + c.TXBWActiveLimitkbitPersec, + prometheus.GaugeValue, + float64(dst[0].TXBWActiveLimitkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.TXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].TXBWkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.TXBWLimitkbitPersec, + prometheus.GaugeValue, + float64(dst[0].TXBWLimitkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.TXPacketLossPercent, + prometheus.GaugeValue, + float64(dst[0].TXPacketLossPercent), + ) + + ch <- prometheus.MustNewConstMetric( + c.TXPacketLossPercent_Base, + prometheus.GaugeValue, + float64(dst[0].TXPacketLossPercent_Base), + ) + + return nil, nil +} + +func (c *TeradiciPcoipCollector) collectUsb(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + if len(dst) == 0 { + return nil, errors.New("WMI query returned empty result set") + } + + ch <- prometheus.MustNewConstMetric( + c.USBBytesReceived, + prometheus.CounterValue, + float64(dst[0].USBBytesReceived), + ) + + ch <- prometheus.MustNewConstMetric( + c.USBBytesSent, + prometheus.CounterValue, + float64(dst[0].USBBytesSent), + ) + + ch <- prometheus.MustNewConstMetric( + c.USBRXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].USBRXBWkbitPersec), + ) + + ch <- prometheus.MustNewConstMetric( + c.USBTXBWkbitPersec, + prometheus.GaugeValue, + float64(dst[0].USBTXBWkbitPersec), + ) + + return nil, nil +} diff --git a/collector/teradici_pcoip_test.go b/collector/teradici_pcoip_test.go new file mode 100644 index 00000000..8593d792 --- /dev/null +++ b/collector/teradici_pcoip_test.go @@ -0,0 +1,9 @@ +package collector + +import ( + "testing" +) + +func BenchmarkTeradiciPcoipCollector(b *testing.B) { + benchmarkCollector(b, "teradici_pcoip", NewTeradiciPcoipCollector) +} diff --git a/collector/vmware_blast.go b/collector/vmware_blast.go new file mode 100644 index 00000000..f72934e9 --- /dev/null +++ b/collector/vmware_blast.go @@ -0,0 +1,1296 @@ +//go:build windows +// +build windows + +package collector + +import ( + "github.com/StackExchange/wmi" + "github.com/prometheus-community/windows_exporter/log" + "github.com/prometheus/client_golang/prometheus" +) + +func init() { + registerCollector("vmware_blast", NewVmwareBlastCollector) +} + +// A VmwareBlastCollector is a Prometheus collector for WMI metrics: +// Win32_PerfRawData_Counters_VMwareBlastAudioCounters +// Win32_PerfRawData_Counters_VMwareBlastCDRCounters +// Win32_PerfRawData_Counters_VMwareBlastClipboardCounters +// Win32_PerfRawData_Counters_VMwareBlastHTML5MMRCounters +// Win32_PerfRawData_Counters_VMwareBlastImagingCounters +// Win32_PerfRawData_Counters_VMwareBlastRTAVCounters +// Win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters +// Win32_PerfRawData_Counters_VMwareBlastSessionCounters +// Win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters +// Win32_PerfRawData_Counters_VMwareBlastThinPrintCounters +// Win32_PerfRawData_Counters_VMwareBlastUSBCounters +// Win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters + +type VmwareBlastCollector struct { + AudioReceivedBytes *prometheus.Desc + AudioReceivedPackets *prometheus.Desc + AudioTransmittedBytes *prometheus.Desc + AudioTransmittedPackets *prometheus.Desc + + CDRReceivedBytes *prometheus.Desc + CDRReceivedPackets *prometheus.Desc + CDRTransmittedBytes *prometheus.Desc + CDRTransmittedPackets *prometheus.Desc + + ClipboardReceivedBytes *prometheus.Desc + ClipboardReceivedPackets *prometheus.Desc + ClipboardTransmittedBytes *prometheus.Desc + ClipboardTransmittedPackets *prometheus.Desc + + HTML5MMRReceivedBytes *prometheus.Desc + HTML5MMRReceivedPackets *prometheus.Desc + HTML5MMRTransmittedBytes *prometheus.Desc + HTML5MMRTransmittedPackets *prometheus.Desc + + ImagingDirtyFramesPerSecond *prometheus.Desc + ImagingFBCRate *prometheus.Desc + ImagingFramesPerSecond *prometheus.Desc + ImagingPollRate *prometheus.Desc + ImagingReceivedBytes *prometheus.Desc + ImagingReceivedPackets *prometheus.Desc + ImagingTotalDirtyFrames *prometheus.Desc + ImagingTotalFBC *prometheus.Desc + ImagingTotalFrames *prometheus.Desc + ImagingTotalPoll *prometheus.Desc + ImagingTransmittedBytes *prometheus.Desc + ImagingTransmittedPackets *prometheus.Desc + + RTAVReceivedBytes *prometheus.Desc + RTAVReceivedPackets *prometheus.Desc + RTAVTransmittedBytes *prometheus.Desc + RTAVTransmittedPackets *prometheus.Desc + + SerialPortandScannerReceivedBytes *prometheus.Desc + SerialPortandScannerReceivedPackets *prometheus.Desc + SerialPortandScannerTransmittedBytes *prometheus.Desc + SerialPortandScannerTransmittedPackets *prometheus.Desc + + SessionAutomaticReconnectCount *prometheus.Desc + SessionCumulativeReceivedBytesOverTCP *prometheus.Desc + SessionCumulativeReceivedBytesOverUDP *prometheus.Desc + SessionCumulativeTransmittedBytesOverTCP *prometheus.Desc + SessionCumulativeTransmittedBytesOverUDP *prometheus.Desc + SessionEstimatedBandwidthUplink *prometheus.Desc + SessionInstantaneousReceivedBytesOverTCP *prometheus.Desc + SessionInstantaneousReceivedBytesOverUDP *prometheus.Desc + SessionInstantaneousTransmittedBytesOverTCP *prometheus.Desc + SessionInstantaneousTransmittedBytesOverUDP *prometheus.Desc + SessionJitterUplink *prometheus.Desc + SessionPacketLossUplink *prometheus.Desc + SessionReceivedBytes *prometheus.Desc + SessionReceivedPackets *prometheus.Desc + SessionRTT *prometheus.Desc + SessionTransmittedBytes *prometheus.Desc + SessionTransmittedPackets *prometheus.Desc + + SkypeforBusinessControlReceivedBytes *prometheus.Desc + SkypeforBusinessControlReceivedPackets *prometheus.Desc + SkypeforBusinessControlTransmittedBytes *prometheus.Desc + SkypeforBusinessControlTransmittedPackets *prometheus.Desc + + ThinPrintReceivedBytes *prometheus.Desc + ThinPrintReceivedPackets *prometheus.Desc + ThinPrintTransmittedBytes *prometheus.Desc + ThinPrintTransmittedPackets *prometheus.Desc + + USBReceivedBytes *prometheus.Desc + USBReceivedPackets *prometheus.Desc + USBTransmittedBytes *prometheus.Desc + USBTransmittedPackets *prometheus.Desc + + WindowsMediaMMRReceivedBytes *prometheus.Desc + WindowsMediaMMRReceivedPackets *prometheus.Desc + WindowsMediaMMRTransmittedBytes *prometheus.Desc + WindowsMediaMMRTransmittedPackets *prometheus.Desc +} + +// NewVmwareBlastCollector constructs a new VmwareBlastCollector +func NewVmwareBlastCollector() (Collector, error) { + const subsystem = "vmware_blast" + return &VmwareBlastCollector{ + AudioReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_received_bytes"), + "(AudioReceivedBytes)", + nil, + nil, + ), + AudioReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_received_packets"), + "(AudioReceivedPackets)", + nil, + nil, + ), + AudioTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_transmitted_bytes"), + "(AudioTransmittedBytes)", + nil, + nil, + ), + AudioTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "audio_transmitted_packets"), + "(AudioTransmittedPackets)", + nil, + nil, + ), + + CDRReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cdr_received_bytes"), + "(CDRReceivedBytes)", + nil, + nil, + ), + CDRReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cdr_received_packets"), + "(CDRReceivedPackets)", + nil, + nil, + ), + CDRTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cdr_transmitted_bytes"), + "(CDRTransmittedBytes)", + nil, + nil, + ), + CDRTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cdr_transmitted_packets"), + "(CDRTransmittedPackets)", + nil, + nil, + ), + + ClipboardReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clipboard_received_bytes"), + "(ClipboardReceivedBytes)", + nil, + nil, + ), + ClipboardReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clipboard_received_packets"), + "(ClipboardReceivedPackets)", + nil, + nil, + ), + ClipboardTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clipboard_transmitted_bytes"), + "(ClipboardTransmittedBytes)", + nil, + nil, + ), + ClipboardTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clipboard_transmitted_packets"), + "(ClipboardTransmittedPackets)", + nil, + nil, + ), + + HTML5MMRReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_received_bytes"), + "(HTML5MMRReceivedBytes)", + nil, + nil, + ), + HTML5MMRReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_received_packets"), + "(HTML5MMRReceivedPackets)", + nil, + nil, + ), + HTML5MMRTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_transmitted_bytes"), + "(HTML5MMRTransmittedBytes)", + nil, + nil, + ), + HTML5MMRTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_transmitted_packets"), + "(HTML5MMRTransmittedPackets)", + nil, + nil, + ), + + ImagingDirtyFramesPerSecond: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_dirty_frames_per_second"), + "(ImagingDirtyFramesPerSecond)", + nil, + nil, + ), + ImagingFBCRate: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_fbc_rate"), + "(ImagingFBCRate)", + nil, + nil, + ), + ImagingFramesPerSecond: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_frames_per_second"), + "(ImagingFramesPerSecond)", + nil, + nil, + ), + ImagingPollRate: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_poll_rate"), + "(ImagingPollRate)", + nil, + nil, + ), + ImagingReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_received_bytes"), + "(ImagingReceivedBytes)", + nil, + nil, + ), + ImagingReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_received_packets"), + "(ImagingReceivedPackets)", + nil, + nil, + ), + ImagingTotalDirtyFrames: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_total_dirty_frames"), + "(ImagingTotalDirtyFrames)", + nil, + nil, + ), + ImagingTotalFBC: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_total_fbc"), + "(ImagingTotalFBC)", + nil, + nil, + ), + ImagingTotalFrames: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_total_frames"), + "(ImagingTotalFrames)", + nil, + nil, + ), + ImagingTotalPoll: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_total_poll"), + "(ImagingTotalPoll)", + nil, + nil, + ), + ImagingTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_transmitted_bytes"), + "(ImagingTransmittedBytes)", + nil, + nil, + ), + ImagingTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "imaging_transmitted_packets"), + "(ImagingTransmittedPackets)", + nil, + nil, + ), + + RTAVReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rtav_received_bytes"), + "(RTAVReceivedBytes)", + nil, + nil, + ), + RTAVReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rtav_received_packets"), + "(RTAVReceivedPackets)", + nil, + nil, + ), + RTAVTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rtav_transmitted_bytes"), + "(RTAVTransmittedBytes)", + nil, + nil, + ), + RTAVTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "rtav_transmitted_packets"), + "(RTAVTransmittedPackets)", + nil, + nil, + ), + + SerialPortandScannerReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_received_bytes"), + "(SerialPortandScannerReceivedBytes)", + nil, + nil, + ), + SerialPortandScannerReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_received_packets"), + "(SerialPortandScannerReceivedPackets)", + nil, + nil, + ), + SerialPortandScannerTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_transmitted_bytes"), + "(SerialPortandScannerTransmittedBytes)", + nil, + nil, + ), + SerialPortandScannerTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_transmitted_packets"), + "(SerialPortandScannerTransmittedPackets)", + nil, + nil, + ), + + SessionAutomaticReconnectCount: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_automatic_reconnect_count"), + "(SessionAutomaticReconnectCount)", + nil, + nil, + ), + SessionCumulativeReceivedBytesOverTCP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_received_bytes_over_tcp"), + "(SessionCumulativeReceivedBytesOverTCP)", + nil, + nil, + ), + SessionCumulativeReceivedBytesOverUDP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_received_bytes_over_udp"), + "(SessionCumulativeReceivedBytesOverUDP)", + nil, + nil, + ), + SessionCumulativeTransmittedBytesOverTCP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_transmitted_bytes_over_tcp"), + "(SessionCumulativeTransmittedBytesOverTCP)", + nil, + nil, + ), + SessionCumulativeTransmittedBytesOverUDP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_transmitted_bytes_over_udp"), + "(SessionCumulativeTransmittedBytesOverUDP)", + nil, + nil, + ), + SessionEstimatedBandwidthUplink: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_estimated_bandwidth_uplink"), + "(SessionEstimatedBandwidthUplink)", + nil, + nil, + ), + SessionInstantaneousReceivedBytesOverTCP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_received_bytes_over_tcp"), + "(SessionInstantaneousReceivedBytesOverTCP)", + nil, + nil, + ), + SessionInstantaneousReceivedBytesOverUDP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_received_bytes_over_udp"), + "(SessionInstantaneousReceivedBytesOverUDP)", + nil, + nil, + ), + SessionInstantaneousTransmittedBytesOverTCP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_transmitted_bytes_over_tcp"), + "(SessionInstantaneousTransmittedBytesOverTCP)", + nil, + nil, + ), + SessionInstantaneousTransmittedBytesOverUDP: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_transmitted_bytes_over_udp"), + "(SessionInstantaneousTransmittedBytesOverUDP)", + nil, + nil, + ), + SessionJitterUplink: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_jitter_uplink"), + "(SessionJitterUplink)", + nil, + nil, + ), + SessionPacketLossUplink: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_packet_loss_uplink"), + "(SessionPacketLossUplink)", + nil, + nil, + ), + SessionReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_received_bytes"), + "(SessionReceivedBytes)", + nil, + nil, + ), + SessionReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_received_packets"), + "(SessionReceivedPackets)", + nil, + nil, + ), + SessionRTT: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_rtt"), + "(SessionRTT)", + nil, + nil, + ), + SessionTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_transmitted_bytes"), + "(SessionTransmittedBytes)", + nil, + nil, + ), + SessionTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "session_transmitted_packets"), + "(SessionTransmittedPackets)", + nil, + nil, + ), + + SkypeforBusinessControlReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_received_bytes"), + "(SkypeforBusinessControlReceivedBytes)", + nil, + nil, + ), + SkypeforBusinessControlReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_received_packets"), + "(SkypeforBusinessControlReceivedPackets)", + nil, + nil, + ), + SkypeforBusinessControlTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_transmitted_bytes"), + "(SkypeforBusinessControlTransmittedBytes)", + nil, + nil, + ), + SkypeforBusinessControlTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_transmitted_packets"), + "(SkypeforBusinessControlTransmittedPackets)", + nil, + nil, + ), + + ThinPrintReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "thinprint_received_bytes"), + "(ThinPrintReceivedBytes)", + nil, + nil, + ), + ThinPrintReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "thinprint_received_packets"), + "(ThinPrintReceivedPackets)", + nil, + nil, + ), + ThinPrintTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "thinprint_transmitted_bytes"), + "(ThinPrintTransmittedBytes)", + nil, + nil, + ), + ThinPrintTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "thinprint_transmitted_packets"), + "(ThinPrintTransmittedPackets)", + nil, + nil, + ), + + USBReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_received_bytes"), + "(USBReceivedBytes)", + nil, + nil, + ), + USBReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_received_packets"), + "(USBReceivedPackets)", + nil, + nil, + ), + USBTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_transmitted_bytes"), + "(USBTransmittedBytes)", + nil, + nil, + ), + USBTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "usb_transmitted_packets"), + "(USBTransmittedPackets)", + nil, + nil, + ), + + WindowsMediaMMRReceivedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_received_bytes"), + "(WindowsMediaMMRReceivedBytes)", + nil, + nil, + ), + WindowsMediaMMRReceivedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_received_packets"), + "(WindowsMediaMMRReceivedPackets)", + nil, + nil, + ), + WindowsMediaMMRTransmittedBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_transmitted_bytes"), + "(WindowsMediaMMRTransmittedBytes)", + nil, + nil, + ), + WindowsMediaMMRTransmittedPackets: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_transmitted_packets"), + "(WindowsMediaMMRTransmittedPackets)", + nil, + nil, + ), + }, nil +} + +// Collect sends the metric values for each metric +// to the provided prometheus Metric channel. +func (c *VmwareBlastCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { + if desc, err := c.collectAudio(ch); err != nil { + log.Error("failed collecting vmware blast audio metrics:", desc, err) + return err + } + if desc, err := c.collectCdr(ch); err != nil { + log.Error("failed collecting vmware blast CDR metrics:", desc, err) + return err + } + if desc, err := c.collectClipboard(ch); err != nil { + log.Error("failed collecting vmware blast clipboard metrics:", desc, err) + return err + } + if desc, err := c.collectHtml5Mmr(ch); err != nil { + log.Error("failed collecting vmware blast HTML5 MMR metrics:", desc, err) + return err + } + if desc, err := c.collectImaging(ch); err != nil { + log.Error("failed collecting vmware blast imaging metrics:", desc, err) + return err + } + if desc, err := c.collectRtav(ch); err != nil { + log.Error("failed collecting vmware blast RTAV metrics:", desc, err) + return err + } + if desc, err := c.collectSerialPortandScanner(ch); err != nil { + log.Error("failed collecting vmware blast serial port and scanner metrics:", desc, err) + return err + } + if desc, err := c.collectSession(ch); err != nil { + log.Error("failed collecting vmware blast metrics:", desc, err) + return err + } + if desc, err := c.collectSkypeforBusinessControl(ch); err != nil { + log.Error("failed collecting vmware blast skype for business control metrics:", desc, err) + return err + } + if desc, err := c.collectThinPrint(ch); err != nil { + log.Error("failed collecting vmware blast thin print metrics:", desc, err) + return err + } + if desc, err := c.collectUsb(ch); err != nil { + log.Error("failed collecting vmware blast USB metrics:", desc, err) + return err + } + if desc, err := c.collectWindowsMediaMmr(ch); err != nil { + log.Error("failed collecting vmware blast windows media MMR metrics:", desc, err) + return err + } + return nil +} + +type Win32_PerfRawData_Counters_VMwareBlastAudioCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastCDRCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastClipboardCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastHTML5MMRcounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastImagingCounters struct { + Dirtyframespersecond uint32 + FBCRate uint32 + Framespersecond uint32 + PollRate uint32 + ReceivedBytes uint32 + ReceivedPackets uint32 + Totaldirtyframes uint32 + TotalFBC uint32 + Totalframes uint32 + Totalpoll uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastRTAVCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastSessionCounters struct { + AutomaticReconnectCount uint32 + CumulativeReceivedBytesoverTCP uint32 + CumulativeReceivedBytesoverUDP uint32 + CumulativeTransmittedBytesoverTCP uint32 + CumulativeTransmittedBytesoverUDP uint32 + EstimatedBandwidthUplink uint32 + InstantaneousReceivedBytesoverTCP uint32 + InstantaneousReceivedBytesoverUDP uint32 + InstantaneousTransmittedBytesoverTCP uint32 + InstantaneousTransmittedBytesoverUDP uint32 + JitterUplink uint32 + PacketLossUplink uint32 + ReceivedBytes uint32 + ReceivedPackets uint32 + RTT uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastThinPrintCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastUSBCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +type Win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters struct { + ReceivedBytes uint32 + ReceivedPackets uint32 + TransmittedBytes uint32 + TransmittedPackets uint32 +} + +func (c *VmwareBlastCollector) collectAudio(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastAudioCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.AudioReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.AudioReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.AudioTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.AudioTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectCdr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastCDRCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.CDRReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.CDRReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.CDRTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.CDRTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectClipboard(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastClipboardCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.ClipboardReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ClipboardReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.ClipboardTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ClipboardTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectHtml5Mmr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastHTML5MMRcounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.HTML5MMRReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.HTML5MMRReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.HTML5MMRTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.HTML5MMRTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectImaging(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastImagingCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.ImagingDirtyFramesPerSecond, + prometheus.GaugeValue, + float64(dst[0].Dirtyframespersecond), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingFBCRate, + prometheus.GaugeValue, + float64(dst[0].FBCRate), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingFramesPerSecond, + prometheus.GaugeValue, + float64(dst[0].Framespersecond), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingPollRate, + prometheus.GaugeValue, + float64(dst[0].PollRate), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingTotalDirtyFrames, + prometheus.CounterValue, + float64(dst[0].Totaldirtyframes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingTotalFBC, + prometheus.CounterValue, + float64(dst[0].TotalFBC), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingTotalFrames, + prometheus.CounterValue, + float64(dst[0].Totalframes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingTotalPoll, + prometheus.CounterValue, + float64(dst[0].Totalpoll), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ImagingTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectRtav(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastRTAVCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.RTAVReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.RTAVReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.RTAVTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.RTAVTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectSerialPortandScanner(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.SerialPortandScannerReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.SerialPortandScannerReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.SerialPortandScannerTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.SerialPortandScannerTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectSession(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastSessionCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.SessionAutomaticReconnectCount, + prometheus.CounterValue, + float64(dst[0].AutomaticReconnectCount), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionCumulativeReceivedBytesOverTCP, + prometheus.CounterValue, + float64(dst[0].CumulativeReceivedBytesoverTCP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionCumulativeReceivedBytesOverUDP, + prometheus.CounterValue, + float64(dst[0].CumulativeReceivedBytesoverUDP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionCumulativeTransmittedBytesOverTCP, + prometheus.CounterValue, + float64(dst[0].CumulativeTransmittedBytesoverTCP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionCumulativeTransmittedBytesOverUDP, + prometheus.CounterValue, + float64(dst[0].CumulativeTransmittedBytesoverUDP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionEstimatedBandwidthUplink, + prometheus.GaugeValue, + float64(dst[0].EstimatedBandwidthUplink), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionInstantaneousReceivedBytesOverTCP, + prometheus.CounterValue, + float64(dst[0].InstantaneousReceivedBytesoverTCP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionInstantaneousReceivedBytesOverUDP, + prometheus.CounterValue, + float64(dst[0].InstantaneousReceivedBytesoverUDP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionInstantaneousTransmittedBytesOverTCP, + prometheus.CounterValue, + float64(dst[0].InstantaneousTransmittedBytesoverTCP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionInstantaneousTransmittedBytesOverUDP, + prometheus.CounterValue, + float64(dst[0].InstantaneousTransmittedBytesoverUDP), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionJitterUplink, + prometheus.GaugeValue, + float64(dst[0].JitterUplink), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionPacketLossUplink, + prometheus.GaugeValue, + float64(dst[0].PacketLossUplink), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionRTT, + prometheus.GaugeValue, + float64(dst[0].RTT), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.SessionTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectSkypeforBusinessControl(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.SkypeforBusinessControlReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.SkypeforBusinessControlReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.SkypeforBusinessControlTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.SkypeforBusinessControlTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectThinPrint(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastThinPrintCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.ThinPrintReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ThinPrintReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.ThinPrintTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.ThinPrintTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectUsb(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastUSBCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.USBReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.USBReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.USBTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.USBTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} + +func (c *VmwareBlastCollector) collectWindowsMediaMmr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []Win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters + q := queryAll(&dst) + if err := wmi.Query(q, &dst); err != nil { + return nil, err + } + + if len(dst) == 0 { + // It's possible for these classes to legitimately return null when queried + return nil, nil + } + + ch <- prometheus.MustNewConstMetric( + c.WindowsMediaMMRReceivedBytes, + prometheus.CounterValue, + float64(dst[0].ReceivedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.WindowsMediaMMRReceivedPackets, + prometheus.CounterValue, + float64(dst[0].ReceivedPackets), + ) + + ch <- prometheus.MustNewConstMetric( + c.WindowsMediaMMRTransmittedBytes, + prometheus.CounterValue, + float64(dst[0].TransmittedBytes), + ) + + ch <- prometheus.MustNewConstMetric( + c.WindowsMediaMMRTransmittedPackets, + prometheus.CounterValue, + float64(dst[0].TransmittedPackets), + ) + + return nil, nil +} diff --git a/collector/vmware_blast_test.go b/collector/vmware_blast_test.go new file mode 100644 index 00000000..1060f9c0 --- /dev/null +++ b/collector/vmware_blast_test.go @@ -0,0 +1,9 @@ +package collector + +import ( + "testing" +) + +func BenchmarkVmwareBlastCollector(b *testing.B) { + benchmarkCollector(b, "vmware_blast", NewVmwareBlastCollector) +} diff --git a/docs/collector.teradici_pcoip.md b/docs/collector.teradici_pcoip.md new file mode 100644 index 00000000..0bab4a88 --- /dev/null +++ b/docs/collector.teradici_pcoip.md @@ -0,0 +1,64 @@ +# teradici_pcoip collector + +The teradici_pcoip collector exposes metrics relating to Teradici PCoIP sessions + +||| +-|- +Metric name prefix | `teradici_pcoip` +Classes | `Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics`, `Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics`,`Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics`,`Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics`,`Win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics` +Enabled by default? | No + +## Flags + +None + +## Metrics + +Name | Description | Type | Labels +-----|-------------|------|------- +`windows_teradici_pcoip_audio_bytes_received` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_audio_bytes_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_audio_rx_bw_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_audio_tx_bw_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_audio_tx_bw_limit_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_bytes_received` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_bytes_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_packets_received` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_packets_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_rx_packets_lost` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_session_duration_seconds` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_tx_packets_lost` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_imaging_active_min_quality` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_imaging_apex2800_offload` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_imaging_bytes_received` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_imaging_bytes_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_imaging_decoder_capability_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_imaging_encoded_frames_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_imaging_megapixel_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_imaging_negative_acks` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_imaging_rx_bw_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_imaging_svga_devtap_frames_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_imaging_tx_bw_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_round_trip_latency_ms` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_rx_bw_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_rx_bw_peak_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_rx_packet_loss_percent` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_rx_packet_loss_percent_base` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_tx_bw_active_limit_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_tx_bw_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_tx_bw_limit_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_tx_packet_loss_percent` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_tx_packet_loss_percent_base` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_usb_bytes_received` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_usb_bytes_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_usb_rx_bw_kbit_persec` | _Not yet documented_ | gauge | None +`windows_teradici_pcoip_usb_tx_bw_kbit_persec` | _Not yet documented_ | gauge | None + +### Example metric +_This collector does not yet have explained examples, we would appreciate your help adding them!_ + +## Useful queries +_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ + +## Alerting examples +_This collector does not yet have alerting examples, we would appreciate your help adding them!_ diff --git a/docs/collector.vmware_blast.md b/docs/collector.vmware_blast.md new file mode 100644 index 00000000..10530d27 --- /dev/null +++ b/docs/collector.vmware_blast.md @@ -0,0 +1,98 @@ +# vmware_blast collector + +The vmware_blast collector exposes metrics relating to VMware Blast sessions + +||| +-|- +Metric name prefix | `vmware_blast` +Classes | `Win32_PerfRawData_Counters_VMwareBlastAudioCounters`,`Win32_PerfRawData_Counters_VMwareBlastCDRCounters`,`Win32_PerfRawData_Counters_VMwareBlastClipboardCounters`,`Win32_PerfRawData_Counters_VMwareBlastHTML5MMRCounters`,`Win32_PerfRawData_Counters_VMwareBlastImagingCounters`,`Win32_PerfRawData_Counters_VMwareBlastRTAVCounters`,`Win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters`,`Win32_PerfRawData_Counters_VMwareBlastSessionCounters`,`Win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters`,`Win32_PerfRawData_Counters_VMwareBlastThinPrintCounters`,`Win32_PerfRawData_Counters_VMwareBlastUSBCounters`,`Win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters` +Enabled by default? | No + +## Flags + +None + +## Metrics + +Some of these metrics may not be collected, depending on the installation options chosen when installing the Horizon agent + +Name | Description | Type | Labels +-----|-------------|------|------- +`windows_vmware_blast_audio_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_audio_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_audio_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_audio_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_dirty_frames_per_second` | _Not yet documented_ | gauge | None +`windows_vmware_blast_imaging_fbc_rate` | _Not yet documented_ | gauge | None +`windows_vmware_blast_imaging_frames_per_second` | _Not yet documented_ | gauge | None +`windows_vmware_blast_imaging_poll_rate` | _Not yet documented_ | gauge | None +`windows_vmware_blast_imaging_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_total_dirty_frames` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_total_fbc` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_total_frames` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_total_poll` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_automatic_reconnect_count` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_received_bytes_over_tcp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_received_bytes_over_udp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_transmitted_bytes_over_tcp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_transmitted_bytes_over_udp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_estimated_bandwidth_uplink` | _Not yet documented_ | gauge | None +`windows_vmware_blast_session_instantaneous_received_bytes_over_tcp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_instantaneous_received_bytes_over_udp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_instantaneous_transmitted_bytes_over_tcp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_instantaneous_transmitted_bytes_over_udp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_jitter_uplink` | _Not yet documented_ | gauge | None +`windows_vmware_blast_session_packet_loss_uplink` | _Not yet documented_ | gauge | None +`windows_vmware_blast_session_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_rtt` | _Not yet documented_ | gauge | None +`windows_vmware_blast_session_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_received_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_transmitted_bytes` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_transmitted_packets` | _Not yet documented_ | counter | None + +### Example metric +_This collector does not yet have explained examples, we would appreciate your help adding them!_ + +## Useful queries +_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ + +## Alerting examples +_This collector does not yet have alerting examples, we would appreciate your help adding them!_ From ba3cffdc79a3aac81010266d1cd4d5a144aadb6f Mon Sep 17 00:00:00 2001 From: Tom Powell Date: Wed, 8 Feb 2023 09:30:36 +0000 Subject: [PATCH 2/3] Applying PR comments Signed-off-by: Tom Powell --- collector/teradici_pcoip.go | 82 +++++------ collector/teradici_pcoip_test.go | 4 +- collector/vmware_blast.go | 232 +++++++++++++++---------------- collector/vmware_blast_test.go | 4 +- docs/collector.teradici_pcoip.md | 28 ++-- docs/collector.vmware_blast.md | 122 ++++++++-------- 6 files changed, 236 insertions(+), 236 deletions(-) diff --git a/collector/teradici_pcoip.go b/collector/teradici_pcoip.go index 0ee230ac..cda5b756 100644 --- a/collector/teradici_pcoip.go +++ b/collector/teradici_pcoip.go @@ -12,17 +12,17 @@ import ( ) func init() { - registerCollector("teradici_pcoip", NewTeradiciPcoipCollector) + registerCollector("teradici_pcoip", newTeradiciPcoipCollector) } -// A TeradiciPcoipCollector is a Prometheus collector for WMI metrics: -// Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics -// Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics -// Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics -// Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics -// Win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics +// A teradiciPcoipCollector is a Prometheus collector for WMI metrics: +// win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics +// win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics +// win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics +// win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics +// win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics -type TeradiciPcoipCollector struct { +type teradiciPcoipCollector struct { AudioBytesReceived *prometheus.Desc AudioBytesSent *prometheus.Desc AudioRXBWkbitPersec *prometheus.Desc @@ -66,18 +66,18 @@ type TeradiciPcoipCollector struct { USBTXBWkbitPersec *prometheus.Desc } -// NewTeradiciPcoipCollector constructs a new TeradiciPcoipCollector -func NewTeradiciPcoipCollector() (Collector, error) { +// newTeradiciPcoipCollector constructs a new teradiciPcoipCollector +func newTeradiciPcoipCollector() (Collector, error) { const subsystem = "teradici_pcoip" - return &TeradiciPcoipCollector{ + return &teradiciPcoipCollector{ AudioBytesReceived: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "audio_bytes_received"), + prometheus.BuildFQName(Namespace, subsystem, "audio_bytes_received_total"), "(AudioBytesReceived)", nil, nil, ), AudioBytesSent: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "audio_bytes_sent"), + prometheus.BuildFQName(Namespace, subsystem, "audio_bytes_sent_total"), "(AudioBytesSent)", nil, nil, @@ -102,43 +102,43 @@ func NewTeradiciPcoipCollector() (Collector, error) { ), BytesReceived: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "bytes_received"), + prometheus.BuildFQName(Namespace, subsystem, "bytes_received_total"), "(BytesReceived)", nil, nil, ), BytesSent: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "bytes_sent"), + prometheus.BuildFQName(Namespace, subsystem, "bytes_sent_total"), "(BytesSent)", nil, nil, ), PacketsReceived: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "packets_received"), + prometheus.BuildFQName(Namespace, subsystem, "packets_received_total"), "(PacketsReceived)", nil, nil, ), PacketsSent: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "packets_sent"), + prometheus.BuildFQName(Namespace, subsystem, "packets_sent_total"), "(PacketsSent)", nil, nil, ), RXPacketsLost: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "rx_packets_lost"), + prometheus.BuildFQName(Namespace, subsystem, "rx_packets_lost_total"), "(RXPacketsLost)", nil, nil, ), SessionDurationSeconds: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_duration_seconds"), + prometheus.BuildFQName(Namespace, subsystem, "session_duration_seconds_total"), "(SessionDurationSeconds)", nil, nil, ), TXPacketsLost: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "tx_packets_lost"), + prometheus.BuildFQName(Namespace, subsystem, "tx_packets_lost_total"), "(TXPacketsLost)", nil, nil, @@ -157,13 +157,13 @@ func NewTeradiciPcoipCollector() (Collector, error) { nil, ), ImagingBytesReceived: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_bytes_received"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_bytes_received_total"), "(ImagingBytesReceived)", nil, nil, ), ImagingBytesSent: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_bytes_sent"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_bytes_sent_total"), "(ImagingBytesSent)", nil, nil, @@ -187,7 +187,7 @@ func NewTeradiciPcoipCollector() (Collector, error) { nil, ), ImagingNegativeAcknowledgements: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_negative_acks"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_negative_acks_total"), "(ImagingNegativeAcknowledgements)", nil, nil, @@ -273,13 +273,13 @@ func NewTeradiciPcoipCollector() (Collector, error) { ), USBBytesReceived: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "usb_bytes_received"), + prometheus.BuildFQName(Namespace, subsystem, "usb_bytes_received_total"), "(USBBytesReceived)", nil, nil, ), USBBytesSent: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "usb_bytes_sent"), + prometheus.BuildFQName(Namespace, subsystem, "usb_bytes_sent_total"), "(USBBytesSent)", nil, nil, @@ -301,7 +301,7 @@ func NewTeradiciPcoipCollector() (Collector, error) { // Collect sends the metric values for each metric // to the provided prometheus Metric channel. -func (c *TeradiciPcoipCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { +func (c *teradiciPcoipCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { if desc, err := c.collectAudio(ch); err != nil { log.Error("failed collecting teradici session audio metrics:", desc, err) return err @@ -325,7 +325,7 @@ func (c *TeradiciPcoipCollector) Collect(ctx *ScrapeContext, ch chan<- prometheu return nil } -type Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics struct { +type win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics struct { AudioBytesReceived uint64 AudioBytesSent uint64 AudioRXBWkbitPersec uint64 @@ -333,7 +333,7 @@ type Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics struct { AudioTXBWLimitkbitPersec uint64 } -type Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics struct { +type win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics struct { BytesReceived uint64 BytesSent uint64 PacketsReceived uint64 @@ -343,7 +343,7 @@ type Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics struct { TXPacketsLost uint64 } -type Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics struct { +type win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics struct { ImagingActiveMinimumQuality uint32 ImagingApex2800Offload uint32 ImagingBytesReceived uint64 @@ -357,7 +357,7 @@ type Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics struct { ImagingTXBWkbitPersec uint64 } -type Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics struct { +type win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics struct { RoundTripLatencyms uint32 RXBWkbitPersec uint64 RXBWPeakkbitPersec uint32 @@ -370,15 +370,15 @@ type Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics struct { TXPacketLossPercent_Base uint32 } -type Win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics struct { +type win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics struct { USBBytesReceived uint64 USBBytesSent uint64 USBRXBWkbitPersec uint64 USBTXBWkbitPersec uint64 } -func (c *TeradiciPcoipCollector) collectAudio(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics +func (c *teradiciPcoipCollector) collectAudio(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -420,8 +420,8 @@ func (c *TeradiciPcoipCollector) collectAudio(ch chan<- prometheus.Metric) (*pro return nil, nil } -func (c *TeradiciPcoipCollector) collectGeneral(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics +func (c *teradiciPcoipCollector) collectGeneral(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -475,8 +475,8 @@ func (c *TeradiciPcoipCollector) collectGeneral(ch chan<- prometheus.Metric) (*p return nil, nil } -func (c *TeradiciPcoipCollector) collectImaging(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics +func (c *teradiciPcoipCollector) collectImaging(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -554,8 +554,8 @@ func (c *TeradiciPcoipCollector) collectImaging(ch chan<- prometheus.Metric) (*p return nil, nil } -func (c *TeradiciPcoipCollector) collectNetwork(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics +func (c *teradiciPcoipCollector) collectNetwork(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -627,8 +627,8 @@ func (c *TeradiciPcoipCollector) collectNetwork(ch chan<- prometheus.Metric) (*p return nil, nil } -func (c *TeradiciPcoipCollector) collectUsb(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics +func (c *teradiciPcoipCollector) collectUsb(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_TeradiciPerf_PCoIPSessionUsbStatistics q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err diff --git a/collector/teradici_pcoip_test.go b/collector/teradici_pcoip_test.go index 8593d792..99149575 100644 --- a/collector/teradici_pcoip_test.go +++ b/collector/teradici_pcoip_test.go @@ -4,6 +4,6 @@ import ( "testing" ) -func BenchmarkTeradiciPcoipCollector(b *testing.B) { - benchmarkCollector(b, "teradici_pcoip", NewTeradiciPcoipCollector) +func benchmarkTeradiciPcoipCollector(b *testing.B) { + benchmarkCollector(b, "teradici_pcoip", newTeradiciPcoipCollector) } diff --git a/collector/vmware_blast.go b/collector/vmware_blast.go index f72934e9..320f6c01 100644 --- a/collector/vmware_blast.go +++ b/collector/vmware_blast.go @@ -10,24 +10,24 @@ import ( ) func init() { - registerCollector("vmware_blast", NewVmwareBlastCollector) + registerCollector("vmware_blast", newVmwareBlastCollector) } -// A VmwareBlastCollector is a Prometheus collector for WMI metrics: -// Win32_PerfRawData_Counters_VMwareBlastAudioCounters -// Win32_PerfRawData_Counters_VMwareBlastCDRCounters -// Win32_PerfRawData_Counters_VMwareBlastClipboardCounters -// Win32_PerfRawData_Counters_VMwareBlastHTML5MMRCounters -// Win32_PerfRawData_Counters_VMwareBlastImagingCounters -// Win32_PerfRawData_Counters_VMwareBlastRTAVCounters -// Win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters -// Win32_PerfRawData_Counters_VMwareBlastSessionCounters -// Win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters -// Win32_PerfRawData_Counters_VMwareBlastThinPrintCounters -// Win32_PerfRawData_Counters_VMwareBlastUSBCounters -// Win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters +// A vmwareBlastCollector is a Prometheus collector for WMI metrics: +// win32_PerfRawData_Counters_VMwareBlastAudioCounters +// win32_PerfRawData_Counters_VMwareBlastCDRCounters +// win32_PerfRawData_Counters_VMwareBlastClipboardCounters +// win32_PerfRawData_Counters_VMwareBlastHTML5MMRCounters +// win32_PerfRawData_Counters_VMwareBlastImagingCounters +// win32_PerfRawData_Counters_VMwareBlastRTAVCounters +// win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters +// win32_PerfRawData_Counters_VMwareBlastSessionCounters +// win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters +// win32_PerfRawData_Counters_VMwareBlastThinPrintCounters +// win32_PerfRawData_Counters_VMwareBlastUSBCounters +// win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters -type VmwareBlastCollector struct { +type vmwareBlastCollector struct { AudioReceivedBytes *prometheus.Desc AudioReceivedPackets *prometheus.Desc AudioTransmittedBytes *prometheus.Desc @@ -110,105 +110,105 @@ type VmwareBlastCollector struct { WindowsMediaMMRTransmittedPackets *prometheus.Desc } -// NewVmwareBlastCollector constructs a new VmwareBlastCollector -func NewVmwareBlastCollector() (Collector, error) { +// newVmwareBlastCollector constructs a new vmwareBlastCollector +func newVmwareBlastCollector() (Collector, error) { const subsystem = "vmware_blast" - return &VmwareBlastCollector{ + return &vmwareBlastCollector{ AudioReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "audio_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "audio_received_bytes_total"), "(AudioReceivedBytes)", nil, nil, ), AudioReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "audio_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "audio_received_packets_total"), "(AudioReceivedPackets)", nil, nil, ), AudioTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "audio_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "audio_transmitted_bytes_total"), "(AudioTransmittedBytes)", nil, nil, ), AudioTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "audio_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "audio_transmitted_packets_total"), "(AudioTransmittedPackets)", nil, nil, ), CDRReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "cdr_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "cdr_received_bytes_total"), "(CDRReceivedBytes)", nil, nil, ), CDRReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "cdr_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "cdr_received_packets_total"), "(CDRReceivedPackets)", nil, nil, ), CDRTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "cdr_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "cdr_transmitted_bytes_total"), "(CDRTransmittedBytes)", nil, nil, ), CDRTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "cdr_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "cdr_transmitted_packets_total"), "(CDRTransmittedPackets)", nil, nil, ), ClipboardReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "clipboard_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "clipboard_received_bytes_total"), "(ClipboardReceivedBytes)", nil, nil, ), ClipboardReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "clipboard_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "clipboard_received_packets_total"), "(ClipboardReceivedPackets)", nil, nil, ), ClipboardTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "clipboard_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "clipboard_transmitted_bytes_total"), "(ClipboardTransmittedBytes)", nil, nil, ), ClipboardTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "clipboard_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "clipboard_transmitted_packets_total"), "(ClipboardTransmittedPackets)", nil, nil, ), HTML5MMRReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_received_bytes_total"), "(HTML5MMRReceivedBytes)", nil, nil, ), HTML5MMRReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_received_packets_total"), "(HTML5MMRReceivedPackets)", nil, nil, ), HTML5MMRTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_transmitted_bytes_total"), "(HTML5MMRTransmittedBytes)", nil, nil, ), HTML5MMRTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "html5_mmr_transmitted_packets_total"), "(HTML5MMRTransmittedPackets)", nil, nil, @@ -239,130 +239,130 @@ func NewVmwareBlastCollector() (Collector, error) { nil, ), ImagingReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_received_bytes_total"), "(ImagingReceivedBytes)", nil, nil, ), ImagingReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_received_packets_total"), "(ImagingReceivedPackets)", nil, nil, ), ImagingTotalDirtyFrames: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_total_dirty_frames"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_total_dirty_frames_total"), "(ImagingTotalDirtyFrames)", nil, nil, ), ImagingTotalFBC: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_total_fbc"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_fbc_total"), "(ImagingTotalFBC)", nil, nil, ), ImagingTotalFrames: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_total_frames"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_frames_total"), "(ImagingTotalFrames)", nil, nil, ), ImagingTotalPoll: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_total_poll"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_poll_total"), "(ImagingTotalPoll)", nil, nil, ), ImagingTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_transmitted_bytes_total"), "(ImagingTransmittedBytes)", nil, nil, ), ImagingTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "imaging_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "imaging_transmitted_packets_total"), "(ImagingTransmittedPackets)", nil, nil, ), RTAVReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "rtav_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "rtav_received_bytes_total"), "(RTAVReceivedBytes)", nil, nil, ), RTAVReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "rtav_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "rtav_received_packets_total"), "(RTAVReceivedPackets)", nil, nil, ), RTAVTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "rtav_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "rtav_transmitted_bytes_total"), "(RTAVTransmittedBytes)", nil, nil, ), RTAVTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "rtav_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "rtav_transmitted_packets_total"), "(RTAVTransmittedPackets)", nil, nil, ), SerialPortandScannerReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_received_bytes_total"), "(SerialPortandScannerReceivedBytes)", nil, nil, ), SerialPortandScannerReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_received_packets_total"), "(SerialPortandScannerReceivedPackets)", nil, nil, ), SerialPortandScannerTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_transmitted_bytes_total"), "(SerialPortandScannerTransmittedBytes)", nil, nil, ), SerialPortandScannerTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "serial_port_and_scanner_transmitted_packets_total"), "(SerialPortandScannerTransmittedPackets)", nil, nil, ), SessionAutomaticReconnectCount: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_automatic_reconnect_count"), + prometheus.BuildFQName(Namespace, subsystem, "session_automatic_reconnect_count_total"), "(SessionAutomaticReconnectCount)", nil, nil, ), SessionCumulativeReceivedBytesOverTCP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_received_bytes_over_tcp"), + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_received_bytes_over_tcp_total"), "(SessionCumulativeReceivedBytesOverTCP)", nil, nil, ), SessionCumulativeReceivedBytesOverUDP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_received_bytes_over_udp"), + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_received_bytes_over_udp_total"), "(SessionCumulativeReceivedBytesOverUDP)", nil, nil, ), SessionCumulativeTransmittedBytesOverTCP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_transmitted_bytes_over_tcp"), + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_transmitted_bytes_over_tcp_total"), "(SessionCumulativeTransmittedBytesOverTCP)", nil, nil, ), SessionCumulativeTransmittedBytesOverUDP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_transmitted_bytes_over_udp"), + prometheus.BuildFQName(Namespace, subsystem, "session_cumlative_transmitted_bytes_over_udp_total"), "(SessionCumulativeTransmittedBytesOverUDP)", nil, nil, @@ -374,25 +374,25 @@ func NewVmwareBlastCollector() (Collector, error) { nil, ), SessionInstantaneousReceivedBytesOverTCP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_received_bytes_over_tcp"), + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_received_bytes_over_tcp_total"), "(SessionInstantaneousReceivedBytesOverTCP)", nil, nil, ), SessionInstantaneousReceivedBytesOverUDP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_received_bytes_over_udp"), + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_received_bytes_over_udp_total"), "(SessionInstantaneousReceivedBytesOverUDP)", nil, nil, ), SessionInstantaneousTransmittedBytesOverTCP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_transmitted_bytes_over_tcp"), + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_transmitted_bytes_over_tcp_total"), "(SessionInstantaneousTransmittedBytesOverTCP)", nil, nil, ), SessionInstantaneousTransmittedBytesOverUDP: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_transmitted_bytes_over_udp"), + prometheus.BuildFQName(Namespace, subsystem, "session_instantaneous_transmitted_bytes_over_udp_total"), "(SessionInstantaneousTransmittedBytesOverUDP)", nil, nil, @@ -410,13 +410,13 @@ func NewVmwareBlastCollector() (Collector, error) { nil, ), SessionReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "session_received_bytes_total"), "(SessionReceivedBytes)", nil, nil, ), SessionReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "session_received_packets_total"), "(SessionReceivedPackets)", nil, nil, @@ -428,113 +428,113 @@ func NewVmwareBlastCollector() (Collector, error) { nil, ), SessionTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "session_transmitted_bytes_total"), "(SessionTransmittedBytes)", nil, nil, ), SessionTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "session_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "session_transmitted_packets_total"), "(SessionTransmittedPackets)", nil, nil, ), SkypeforBusinessControlReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_received_bytes_total"), "(SkypeforBusinessControlReceivedBytes)", nil, nil, ), SkypeforBusinessControlReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_received_packets_total"), "(SkypeforBusinessControlReceivedPackets)", nil, nil, ), SkypeforBusinessControlTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_transmitted_bytes_total"), "(SkypeforBusinessControlTransmittedBytes)", nil, nil, ), SkypeforBusinessControlTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "skype_for_business_control_transmitted_packets_total"), "(SkypeforBusinessControlTransmittedPackets)", nil, nil, ), ThinPrintReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "thinprint_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "thinprint_received_bytes_total"), "(ThinPrintReceivedBytes)", nil, nil, ), ThinPrintReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "thinprint_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "thinprint_received_packets_total"), "(ThinPrintReceivedPackets)", nil, nil, ), ThinPrintTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "thinprint_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "thinprint_transmitted_bytes_total"), "(ThinPrintTransmittedBytes)", nil, nil, ), ThinPrintTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "thinprint_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "thinprint_transmitted_packets_total"), "(ThinPrintTransmittedPackets)", nil, nil, ), USBReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "usb_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "usb_received_bytes_total"), "(USBReceivedBytes)", nil, nil, ), USBReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "usb_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "usb_received_packets_total"), "(USBReceivedPackets)", nil, nil, ), USBTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "usb_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "usb_transmitted_bytes_total"), "(USBTransmittedBytes)", nil, nil, ), USBTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "usb_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "usb_transmitted_packets_total"), "(USBTransmittedPackets)", nil, nil, ), WindowsMediaMMRReceivedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_received_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_received_bytes_total"), "(WindowsMediaMMRReceivedBytes)", nil, nil, ), WindowsMediaMMRReceivedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_received_packets"), + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_received_packets_total"), "(WindowsMediaMMRReceivedPackets)", nil, nil, ), WindowsMediaMMRTransmittedBytes: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_transmitted_bytes"), + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_transmitted_bytes_total"), "(WindowsMediaMMRTransmittedBytes)", nil, nil, ), WindowsMediaMMRTransmittedPackets: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_transmitted_packets"), + prometheus.BuildFQName(Namespace, subsystem, "windows_media_mmr_transmitted_packets_total"), "(WindowsMediaMMRTransmittedPackets)", nil, nil, @@ -544,7 +544,7 @@ func NewVmwareBlastCollector() (Collector, error) { // Collect sends the metric values for each metric // to the provided prometheus Metric channel. -func (c *VmwareBlastCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { +func (c *vmwareBlastCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { if desc, err := c.collectAudio(ch); err != nil { log.Error("failed collecting vmware blast audio metrics:", desc, err) return err @@ -596,35 +596,35 @@ func (c *VmwareBlastCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus. return nil } -type Win32_PerfRawData_Counters_VMwareBlastAudioCounters struct { +type win32_PerfRawData_Counters_VMwareBlastAudioCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastCDRCounters struct { +type win32_PerfRawData_Counters_VMwareBlastCDRCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastClipboardCounters struct { +type win32_PerfRawData_Counters_VMwareBlastClipboardCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastHTML5MMRcounters struct { +type win32_PerfRawData_Counters_VMwareBlastHTML5MMRcounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastImagingCounters struct { +type win32_PerfRawData_Counters_VMwareBlastImagingCounters struct { Dirtyframespersecond uint32 FBCRate uint32 Framespersecond uint32 @@ -639,21 +639,21 @@ type Win32_PerfRawData_Counters_VMwareBlastImagingCounters struct { TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastRTAVCounters struct { +type win32_PerfRawData_Counters_VMwareBlastRTAVCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters struct { +type win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastSessionCounters struct { +type win32_PerfRawData_Counters_VMwareBlastSessionCounters struct { AutomaticReconnectCount uint32 CumulativeReceivedBytesoverTCP uint32 CumulativeReceivedBytesoverUDP uint32 @@ -673,36 +673,36 @@ type Win32_PerfRawData_Counters_VMwareBlastSessionCounters struct { TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters struct { +type win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastThinPrintCounters struct { +type win32_PerfRawData_Counters_VMwareBlastThinPrintCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastUSBCounters struct { +type win32_PerfRawData_Counters_VMwareBlastUSBCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -type Win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters struct { +type win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters struct { ReceivedBytes uint32 ReceivedPackets uint32 TransmittedBytes uint32 TransmittedPackets uint32 } -func (c *VmwareBlastCollector) collectAudio(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastAudioCounters +func (c *vmwareBlastCollector) collectAudio(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastAudioCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -740,8 +740,8 @@ func (c *VmwareBlastCollector) collectAudio(ch chan<- prometheus.Metric) (*prome return nil, nil } -func (c *VmwareBlastCollector) collectCdr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastCDRCounters +func (c *vmwareBlastCollector) collectCdr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastCDRCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -779,8 +779,8 @@ func (c *VmwareBlastCollector) collectCdr(ch chan<- prometheus.Metric) (*prometh return nil, nil } -func (c *VmwareBlastCollector) collectClipboard(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastClipboardCounters +func (c *vmwareBlastCollector) collectClipboard(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastClipboardCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -818,8 +818,8 @@ func (c *VmwareBlastCollector) collectClipboard(ch chan<- prometheus.Metric) (*p return nil, nil } -func (c *VmwareBlastCollector) collectHtml5Mmr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastHTML5MMRcounters +func (c *vmwareBlastCollector) collectHtml5Mmr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastHTML5MMRcounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -857,8 +857,8 @@ func (c *VmwareBlastCollector) collectHtml5Mmr(ch chan<- prometheus.Metric) (*pr return nil, nil } -func (c *VmwareBlastCollector) collectImaging(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastImagingCounters +func (c *vmwareBlastCollector) collectImaging(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastImagingCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -944,8 +944,8 @@ func (c *VmwareBlastCollector) collectImaging(ch chan<- prometheus.Metric) (*pro return nil, nil } -func (c *VmwareBlastCollector) collectRtav(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastRTAVCounters +func (c *vmwareBlastCollector) collectRtav(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastRTAVCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -983,8 +983,8 @@ func (c *VmwareBlastCollector) collectRtav(ch chan<- prometheus.Metric) (*promet return nil, nil } -func (c *VmwareBlastCollector) collectSerialPortandScanner(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters +func (c *vmwareBlastCollector) collectSerialPortandScanner(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastSerialPortandScannerCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -1022,8 +1022,8 @@ func (c *VmwareBlastCollector) collectSerialPortandScanner(ch chan<- prometheus. return nil, nil } -func (c *VmwareBlastCollector) collectSession(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastSessionCounters +func (c *vmwareBlastCollector) collectSession(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastSessionCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -1139,8 +1139,8 @@ func (c *VmwareBlastCollector) collectSession(ch chan<- prometheus.Metric) (*pro return nil, nil } -func (c *VmwareBlastCollector) collectSkypeforBusinessControl(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters +func (c *vmwareBlastCollector) collectSkypeforBusinessControl(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastSkypeforBusinessControlCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -1178,8 +1178,8 @@ func (c *VmwareBlastCollector) collectSkypeforBusinessControl(ch chan<- promethe return nil, nil } -func (c *VmwareBlastCollector) collectThinPrint(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastThinPrintCounters +func (c *vmwareBlastCollector) collectThinPrint(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastThinPrintCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -1217,8 +1217,8 @@ func (c *VmwareBlastCollector) collectThinPrint(ch chan<- prometheus.Metric) (*p return nil, nil } -func (c *VmwareBlastCollector) collectUsb(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastUSBCounters +func (c *vmwareBlastCollector) collectUsb(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastUSBCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err @@ -1256,8 +1256,8 @@ func (c *VmwareBlastCollector) collectUsb(ch chan<- prometheus.Metric) (*prometh return nil, nil } -func (c *VmwareBlastCollector) collectWindowsMediaMmr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { - var dst []Win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters +func (c *vmwareBlastCollector) collectWindowsMediaMmr(ch chan<- prometheus.Metric) (*prometheus.Desc, error) { + var dst []win32_PerfRawData_Counters_VMwareBlastWindowsMediaMMRCounters q := queryAll(&dst) if err := wmi.Query(q, &dst); err != nil { return nil, err diff --git a/collector/vmware_blast_test.go b/collector/vmware_blast_test.go index 1060f9c0..a6c46a30 100644 --- a/collector/vmware_blast_test.go +++ b/collector/vmware_blast_test.go @@ -4,6 +4,6 @@ import ( "testing" ) -func BenchmarkVmwareBlastCollector(b *testing.B) { - benchmarkCollector(b, "vmware_blast", NewVmwareBlastCollector) +func benchmarkVmwareBlastCollector(b *testing.B) { + benchmarkCollector(b, "vmware_blast", newVmwareBlastCollector) } diff --git a/docs/collector.teradici_pcoip.md b/docs/collector.teradici_pcoip.md index 0bab4a88..2fc0d04c 100644 --- a/docs/collector.teradici_pcoip.md +++ b/docs/collector.teradici_pcoip.md @@ -16,26 +16,26 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`windows_teradici_pcoip_audio_bytes_received` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_audio_bytes_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_audio_bytes_received_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_audio_bytes_sent_total` | _Not yet documented_ | counter | None `windows_teradici_pcoip_audio_rx_bw_kbit_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_audio_tx_bw_kbit_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_audio_tx_bw_limit_kbit_persec` | _Not yet documented_ | gauge | None -`windows_teradici_pcoip_bytes_received` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_bytes_sent` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_packets_received` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_packets_sent` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_rx_packets_lost` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_session_duration_seconds` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_tx_packets_lost` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_bytes_received_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_bytes_sent_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_packets_received_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_packets_sent_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_rx_packets_lost_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_session_duration_seconds_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_tx_packets_lost_total` | _Not yet documented_ | counter | None `windows_teradici_pcoip_imaging_active_min_quality` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_imaging_apex2800_offload` | _Not yet documented_ | gauge | None -`windows_teradici_pcoip_imaging_bytes_received` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_imaging_bytes_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_imaging_bytes_received_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_imaging_bytes_sent_total` | _Not yet documented_ | counter | None `windows_teradici_pcoip_imaging_decoder_capability_kbit_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_imaging_encoded_frames_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_imaging_megapixel_persec` | _Not yet documented_ | gauge | None -`windows_teradici_pcoip_imaging_negative_acks` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_imaging_negative_acks_total` | _Not yet documented_ | counter | None `windows_teradici_pcoip_imaging_rx_bw_kbit_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_imaging_svga_devtap_frames_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_imaging_tx_bw_kbit_persec` | _Not yet documented_ | gauge | None @@ -49,8 +49,8 @@ Name | Description | Type | Labels `windows_teradici_pcoip_tx_bw_limit_kbit_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_tx_packet_loss_percent` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_tx_packet_loss_percent_base` | _Not yet documented_ | gauge | None -`windows_teradici_pcoip_usb_bytes_received` | _Not yet documented_ | counter | None -`windows_teradici_pcoip_usb_bytes_sent` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_usb_bytes_received_total` | _Not yet documented_ | counter | None +`windows_teradici_pcoip_usb_bytes_sent_total` | _Not yet documented_ | counter | None `windows_teradici_pcoip_usb_rx_bw_kbit_persec` | _Not yet documented_ | gauge | None `windows_teradici_pcoip_usb_tx_bw_kbit_persec` | _Not yet documented_ | gauge | None diff --git a/docs/collector.vmware_blast.md b/docs/collector.vmware_blast.md index 10530d27..aac689ac 100644 --- a/docs/collector.vmware_blast.md +++ b/docs/collector.vmware_blast.md @@ -18,75 +18,75 @@ Some of these metrics may not be collected, depending on the installation option Name | Description | Type | Labels -----|-------------|------|------- -`windows_vmware_blast_audio_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_audio_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_audio_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_audio_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_cdr_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_cdr_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_cdr_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_cdr_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_clipboard_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_clipboard_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_clipboard_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_clipboard_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_html5_mmr_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_html5_mmr_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_html5_mmr_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_html5_mmr_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_audio_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_audio_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_audio_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_audio_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_cdr_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_clipboard_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_html5_mmr_transmitted_packets_total` | _Not yet documented_ | counter | None `windows_vmware_blast_imaging_dirty_frames_per_second` | _Not yet documented_ | gauge | None `windows_vmware_blast_imaging_fbc_rate` | _Not yet documented_ | gauge | None `windows_vmware_blast_imaging_frames_per_second` | _Not yet documented_ | gauge | None `windows_vmware_blast_imaging_poll_rate` | _Not yet documented_ | gauge | None -`windows_vmware_blast_imaging_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_imaging_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_imaging_total_dirty_frames` | _Not yet documented_ | counter | None -`windows_vmware_blast_imaging_total_fbc` | _Not yet documented_ | counter | None -`windows_vmware_blast_imaging_total_frames` | _Not yet documented_ | counter | None -`windows_vmware_blast_imaging_total_poll` | _Not yet documented_ | counter | None -`windows_vmware_blast_imaging_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_imaging_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_rtav_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_rtav_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_rtav_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_rtav_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_serial_port_and_scanner_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_serial_port_and_scanner_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_serial_port_and_scanner_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_serial_port_and_scanner_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_automatic_reconnect_count` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_cumlative_received_bytes_over_tcp` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_cumlative_received_bytes_over_udp` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_cumlative_transmitted_bytes_over_tcp` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_cumlative_transmitted_bytes_over_udp` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_dirty_frames_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_fbc_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_frames_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_poll_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_imaging_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_rtav_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_serial_port_and_scanner_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_automatic_reconnect_count_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_received_bytes_over_tcp_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_received_bytes_over_udp_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_transmitted_bytes_over_tcp_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_cumlative_transmitted_bytes_over_udp_total` | _Not yet documented_ | counter | None `windows_vmware_blast_session_estimated_bandwidth_uplink` | _Not yet documented_ | gauge | None -`windows_vmware_blast_session_instantaneous_received_bytes_over_tcp` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_instantaneous_received_bytes_over_udp` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_instantaneous_transmitted_bytes_over_tcp` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_instantaneous_transmitted_bytes_over_udp` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_instantaneous_received_bytes_over_tcp_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_instantaneous_received_bytes_over_udp_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_instantaneous_transmitted_bytes_over_tcp_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_instantaneous_transmitted_bytes_over_udp_total` | _Not yet documented_ | counter | None `windows_vmware_blast_session_jitter_uplink` | _Not yet documented_ | gauge | None `windows_vmware_blast_session_packet_loss_uplink` | _Not yet documented_ | gauge | None -`windows_vmware_blast_session_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_received_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_received_packets_total` | _Not yet documented_ | counter | None `windows_vmware_blast_session_rtt` | _Not yet documented_ | gauge | None -`windows_vmware_blast_session_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_session_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_skype_for_business_control_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_skype_for_business_control_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_skype_for_business_control_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_skype_for_business_control_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_thinprint_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_thinprint_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_thinprint_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_thinprint_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_usb_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_usb_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_usb_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_usb_transmitted_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_windows_media_mmr_received_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_windows_media_mmr_received_packets` | _Not yet documented_ | counter | None -`windows_vmware_blast_windows_media_mmr_transmitted_bytes` | _Not yet documented_ | counter | None -`windows_vmware_blast_windows_media_mmr_transmitted_packets` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_session_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_skype_for_business_control_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_thinprint_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_usb_transmitted_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_received_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_received_packets_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_transmitted_bytes_total` | _Not yet documented_ | counter | None +`windows_vmware_blast_windows_media_mmr_transmitted_packets_total` | _Not yet documented_ | counter | None ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ From 846263afeefb2575b6a4ddfb33259b65d5929e32 Mon Sep 17 00:00:00 2001 From: Tom Powell Date: Wed, 8 Feb 2023 10:12:15 +0000 Subject: [PATCH 3/3] Returning test functions to public Signed-off-by: Tom Powell --- collector/teradici_pcoip_test.go | 2 +- collector/vmware_blast_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collector/teradici_pcoip_test.go b/collector/teradici_pcoip_test.go index 99149575..41dc270d 100644 --- a/collector/teradici_pcoip_test.go +++ b/collector/teradici_pcoip_test.go @@ -4,6 +4,6 @@ import ( "testing" ) -func benchmarkTeradiciPcoipCollector(b *testing.B) { +func BenchmarkTeradiciPcoipCollector(b *testing.B) { benchmarkCollector(b, "teradici_pcoip", newTeradiciPcoipCollector) } diff --git a/collector/vmware_blast_test.go b/collector/vmware_blast_test.go index a6c46a30..ff1b645b 100644 --- a/collector/vmware_blast_test.go +++ b/collector/vmware_blast_test.go @@ -4,6 +4,6 @@ import ( "testing" ) -func benchmarkVmwareBlastCollector(b *testing.B) { +func BenchmarkVmwareBlastCollector(b *testing.B) { benchmarkCollector(b, "vmware_blast", newVmwareBlastCollector) }