From b44d855fe0e19f95a33487bdedaa9fc3cbe4dbb8 Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Thu, 28 Jan 2021 21:58:18 +1000 Subject: [PATCH 1/2] Add missing dfsr metric descriptions Signed-off-by: Ben Reedy --- collector/dfsr.go | 36 ++++++++++++++++++------------------ docs/collector.dfsr.md | 34 +++++++++++++++++----------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/collector/dfsr.go b/collector/dfsr.go index 2573ca94..10c5e449 100644 --- a/collector/dfsr.go +++ b/collector/dfsr.go @@ -125,7 +125,7 @@ func NewDFSRCollector() (Collector, error) { // Connection ConnectionBandwidthSavingsUsingDFSReplicationTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "bandwidth_savings_using_dfs_replication_bytes_total"), - "Total amount of bandwidth savings using DFS Replication for this connection, in bytes", + "Total bytes of bandwidth saved using DFS Replication for this connection", []string{"name"}, nil, ), @@ -138,8 +138,8 @@ func NewDFSRCollector() (Collector, error) { ), ConnectionCompressedSizeOfFilesReceivedTotal: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "compressed_size_of_files_received_total"), - "", + prometheus.BuildFQName(Namespace, subsystem, "compressed_size_of_files_received_bytes_total"), + "Total compressed size of files received on the connection, in bytes", []string{"name"}, nil, ), @@ -153,21 +153,21 @@ func NewDFSRCollector() (Collector, error) { ConnectionRDCBytesReceivedTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "rdc_received_bytes_total"), - "", + "Total bytes received on the connection while replicating files using Remote Differential Compression", []string{"name"}, nil, ), ConnectionRDCCompressedSizeOfFilesReceivedTotal: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "rdc_compressed_size_of_files_received_total"), - "", + prometheus.BuildFQName(Namespace, subsystem, "rdc_compressed_size_of_received_files_bytes_total"), + "Total uncompressed size of files received with Remote Differential Compression for connection", []string{"name"}, nil, ), ConnectionRDCNumberofFilesReceivedTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "rdc_received_files_total"), - "Total number of Remote Differential Compression files received", + "Total number of files received using remote differential compression", []string{"name"}, nil, ), @@ -188,57 +188,57 @@ func NewDFSRCollector() (Collector, error) { // Folder FolderBandwidthSavingsUsingDFSReplicationTotal: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "bandwidth_savings_using_dfs_replication_total"), - "", + prometheus.BuildFQName(Namespace, subsystem, "bandwidth_savings_using_dfs_replication_bytes_total"), + "Total bytes of bandwidth saved using DFS Replication for this folder", []string{"name"}, nil, ), FolderCompressedSizeOfFilesReceivedTotal: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "compressed_size_of_files_received_total"), - "", + prometheus.BuildFQName(Namespace, subsystem, "compressed_size_of_received_files_bytes_total"), + "Total compressed size of files received on the folder, in bytes", []string{"name"}, nil, ), FolderConflictBytesCleanedupTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "conflict_cleaned_up_bytes_total"), - "", + "Total size of conflict loser files and folders deleted from the Conflict and Deleted folder, in bytes", []string{"name"}, nil, ), FolderConflictBytesGeneratedTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "conflict_generated_bytes_total"), - "", + "Total size of conflict loser files and folders moved to the Conflict and Deleted folder, in bytes", []string{"name"}, nil, ), FolderConflictFilesCleanedUpTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "conflict_cleaned_up_files_total"), - "", + "Number of conflict loser files deleted from the Conflict and Deleted folder", []string{"name"}, nil, ), FolderConflictFilesGeneratedTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "conflict_generated_files_total"), - "", + "Number of files and folders moved to the Conflict and Deleted folder", []string{"name"}, nil, ), FolderConflictFolderCleanupsCompletedTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "conflict_folder_cleanups_total"), - "", + "Number of deletions of conflict loser files and folders in the Conflict and Deleted", []string{"name"}, nil, ), FolderConflictSpaceInUse: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "conflict_space_in_use_bytes"), - "", + "Total size of the conflict loser files and folders currently in the Conflict and Deleted folder", []string{"name"}, nil, ), @@ -307,7 +307,7 @@ func NewDFSRCollector() (Collector, error) { ), FolderRDCCompressedSizeOfFilesReceivedTotal: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "rdc_compressed_size_of_files_received_bytes_total"), + prometheus.BuildFQName(Namespace, subsystem, "rdc_compressed_size_of_received_files_bytes_total"), "", []string{"name"}, nil, diff --git a/docs/collector.dfsr.md b/docs/collector.dfsr.md index e018f107..657a388e 100644 --- a/docs/collector.dfsr.md +++ b/docs/collector.dfsr.md @@ -23,23 +23,23 @@ Name | Description | Type | Labels -----|-------------|------|------- `windows_dfsr_collector_duration_seconds` | The time taken for each sub-collector to return | gauge | collector `windows_dfsr_collector_success` | 1 if sub-collector succeeded, 0 otherwise | gauge | collector -`windows_dfsr_connection_bandwidth_savings_using_dfs_replication_total` | | counter | name -`windows_dfsr_connection_bytes_received_total` | | counter | name -`windows_dfsr_connection_compressed_size_of_files_received_total` | | counter | name -`windows_dfsr_connection_files_received_total` | | counter | name -`windows_dfsr_connection_rdc_bytes_received_total` | | counter | name -`windows_dfsr_connection_rdc_compressed_size_of_files_received_total` | | counter | name -`windows_dfsr_connection_rdc_number_of_files_received_total` | | counter | name -`windows_dfsr_connection_rdc_size_of_files_received_total` | | counter | name -`windows_dfsr_connection_size_of_files_received_total` | | counter | name -`windows_dfsr_folder_bandwidth_savings_using_dfs_replication_total` | | counter | name -`windows_dfsr_folder_compressed_size_of_files_received_total` | | counter | name -`windows_dfsr_folder_conflict_bytes_cleaned_up_total` | | counter | name -`windows_dfsr_folder_conflict_bytes_generated_total` | | counter | name -`windows_dfsr_folder_conflict_files_cleaned_up_total` | | counter | name -`windows_dfsr_folder_conflict_files_generated_total` | | counter | name -`windows_dfsr_folder_conflict_folder_cleanups_total` | | counter | name -`windows_dfsr_folder_conflict_space_in_use` | | gauge | name +`windows_dfsr_connection_bandwidth_savings_using_dfs_replication_bytes_total` | Total bandwidth (in bytes) saved by the DFS Replication service for this connection, using a combination of remote differential compression (RDC) and other compression technologies that minimize network bandwidth use. | counter | name +`windows_dfsr_connection_bytes_received_total` | Total bytes received for connection | counter | name +`windows_dfsr_connection_compressed_size_of_files_received_bytes_total` | Total compressed size of files received on the connection, in bytes | counter | name +`windows_dfsr_connection_received_files_total` | Total number of files received for connection | counter | name +`windows_dfsr_connection_rdc_received_bytes_total` | Total bytes received on the connection while replicating files using Remote Differential Compression. This is the actual bytes received over the network without the networking protocol overhead | counter | name +`windows_dfsr_connection_rdc_compressed_size_of_received_files_bytes_total` | Total compressed size of files received with Remote Differential Compression. This is the number of bytes that would have been received had RDC not been used. This is not the actual number of bytes received over the network. | counter | name +`windows_dfsr_connection_rdc_received_files_total` | Total number of files received using remote differential compression | counter | name +`windows_dfsr_connection_rdc_size_of_files_received_total` | Total uncompressed size of files received with remote differential compression, in bytes. This is the number of bytes that would have been received had neither compression nor RDC been used. This is not the actual number of bytes received over the network. | counter | name +`windows_dfsr_connection_size_of_files_received_total` | Total uncompressed size of files received on the connection, in bytes. This is the number of bytes that would have been received had DFS Replication compression not been used. | counter | name +`windows_dfsr_folder_bandwidth_savings_using_dfs_replication_bytes_total` | Total bandwidth (in bytes) saved by the DFS Replication service for this folder, using a combination of remote differential compression (RDC) and other compression technologies that minimize network bandwidth use. | counter | name +`windows_dfsr_folder_compressed_size_of_received_files_bytes_total` | Total compressed size of files received for this folder, in bytes | counter | name +`windows_dfsr_folder_conflict_cleaned_up_bytes_total` | Total size of conflict loser files and folders deleted from the Conflict and Deleted folder, in bytes. | counter | name +`windows_dfsr_folder_conflict_generated_bytes_total` | Total size of conflict loser files and folders moved to the Conflict and Deleted folder, in bytes. | counter | name +`windows_dfsr_folder_conflict_cleaned_up_files_total` | Number of conflict loser files deleted from the Conflict and Deleted folder. | counter | name +`windows_dfsr_folder_conflict_generated_files_total` | Number of files and folders moved to the Conflict and Deleted folder | counter | name +`windows_dfsr_folder_conflict_folder_cleanups_total` | Number of deletions of conflict loser files and folders in the Conflict and Deleted | counter | name +`windows_dfsr_folder_conflict_space_in_use` | Total size of the conflict loser files and folders currently in the Conflict and Deleted folder | gauge | name `windows_dfsr_folder_deleted_space_in_use` | | gauge | name `windows_dfsr_folder_deleted_bytes_cleaned_up_total` | | counter | name `windows_dfsr_folder_deleted_bytes_generated_total` | | counter | name From e141e531ed16d40fb76434af1b32b0d759c246e6 Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Sat, 30 Jan 2021 18:56:45 +1000 Subject: [PATCH 2/2] Remove unused dfsr meta metrics and function Signed-off-by: Ben Reedy --- collector/dfsr.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/collector/dfsr.go b/collector/dfsr.go index 10c5e449..4616930a 100644 --- a/collector/dfsr.go +++ b/collector/dfsr.go @@ -23,10 +23,6 @@ func init() { // DFSRCollector contains the metric and state data of the DFSR collectors. type DFSRCollector struct { - // Meta - dfsrScrapeDurationDesc *prometheus.Desc - dfsrScrapeSuccessDesc *prometheus.Desc - // Connection source ConnectionBandwidthSavingsUsingDFSReplicationTotal *prometheus.Desc ConnectionBytesReceivedTotal *prometheus.Desc @@ -108,20 +104,6 @@ func NewDFSRCollector() (Collector, error) { addPerfCounterDependencies(subsystem, perfCounters) dfsrCollector := DFSRCollector{ - // meta - dfsrScrapeDurationDesc: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "collector_duration_seconds"), - "windows_exporter: Duration of an dfsr child collection.", - []string{"collector"}, - nil, - ), - dfsrScrapeSuccessDesc: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "collector_success"), - "windows_exporter: Whether a dfsr child collector was successful.", - []string{"collector"}, - nil, - ), - // Connection ConnectionBandwidthSavingsUsingDFSReplicationTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "bandwidth_savings_using_dfs_replication_bytes_total"), @@ -448,17 +430,6 @@ func (c *DFSRCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) return nil } -// Child-specific functions are provided to this function and executed concurrently. -// Child collector metrics & results are reported. -func (c *DFSRCollector) execute(ctx *ScrapeContext, name string, fn dfsrCollectorFunc, ch chan<- prometheus.Metric) error { - // Child collector function called here, sends metric data back through channel - err := fn(ctx, ch) - if err != nil { - return err - } - return err -} - // Perflib: "DFS Replication Service Connections" type PerflibDFSRConnection struct { Name string