mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-26 06:36:36 +00:00
Merge pull request #710 from breed808/dfsr_descriptions
Add missing dfsr metric descriptions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user