Merge pull request #710 from breed808/dfsr_descriptions

Add missing dfsr metric descriptions
This commit is contained in:
Ben Reedy 2021-02-02 13:45:37 +10:00 committed by GitHub
commit b9b60f1ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 64 deletions

View File

@ -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,24 +104,10 @@ 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"),
"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 +120,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 +135,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 +170,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 +289,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,
@ -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

View File

@ -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