mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-04 01:26:37 +00:00
Remove unused dfsr meta metrics and function
Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
@@ -23,10 +23,6 @@ func init() {
|
|||||||
|
|
||||||
// DFSRCollector contains the metric and state data of the DFSR collectors.
|
// DFSRCollector contains the metric and state data of the DFSR collectors.
|
||||||
type DFSRCollector struct {
|
type DFSRCollector struct {
|
||||||
// Meta
|
|
||||||
dfsrScrapeDurationDesc *prometheus.Desc
|
|
||||||
dfsrScrapeSuccessDesc *prometheus.Desc
|
|
||||||
|
|
||||||
// Connection source
|
// Connection source
|
||||||
ConnectionBandwidthSavingsUsingDFSReplicationTotal *prometheus.Desc
|
ConnectionBandwidthSavingsUsingDFSReplicationTotal *prometheus.Desc
|
||||||
ConnectionBytesReceivedTotal *prometheus.Desc
|
ConnectionBytesReceivedTotal *prometheus.Desc
|
||||||
@@ -108,20 +104,6 @@ func NewDFSRCollector() (Collector, error) {
|
|||||||
addPerfCounterDependencies(subsystem, perfCounters)
|
addPerfCounterDependencies(subsystem, perfCounters)
|
||||||
|
|
||||||
dfsrCollector := DFSRCollector{
|
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
|
// Connection
|
||||||
ConnectionBandwidthSavingsUsingDFSReplicationTotal: prometheus.NewDesc(
|
ConnectionBandwidthSavingsUsingDFSReplicationTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, subsystem, "bandwidth_savings_using_dfs_replication_bytes_total"),
|
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
|
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"
|
// Perflib: "DFS Replication Service Connections"
|
||||||
type PerflibDFSRConnection struct {
|
type PerflibDFSRConnection struct {
|
||||||
Name string
|
Name string
|
||||||
|
|||||||
Reference in New Issue
Block a user