mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-27 15:16:35 +00:00
Change metric namespace from wmi to windows
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
// ...
|
||||
const (
|
||||
// TODO: Make package-local
|
||||
Namespace = "wmi"
|
||||
Namespace = "windows"
|
||||
|
||||
// Conversion factors
|
||||
ticksToSecondsScaleFactor = 1 / 1e7
|
||||
|
||||
@@ -396,13 +396,13 @@ func NewMSSQLCollector() (Collector, error) {
|
||||
// meta
|
||||
mssqlScrapeDurationDesc: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "collector_duration_seconds"),
|
||||
"wmi_exporter: Duration of an mssql child collection.",
|
||||
"windows_exporter: Duration of an mssql child collection.",
|
||||
[]string{"collector", "instance"},
|
||||
nil,
|
||||
),
|
||||
mssqlScrapeSuccessDesc: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "collector_success"),
|
||||
"wmi_exporter: Whether a mssql child collector was successful.",
|
||||
"windows_exporter: Whether a mssql child collector was successful.",
|
||||
[]string{"collector", "instance"},
|
||||
nil,
|
||||
),
|
||||
|
||||
@@ -40,7 +40,7 @@ var (
|
||||
).Default("C:\\Program Files\\wmi_exporter\\textfile_inputs").String()
|
||||
|
||||
mtimeDesc = prometheus.NewDesc(
|
||||
"wmi_textfile_mtime_seconds",
|
||||
prometheus.BuildFQName(Namespace, "textfile", "mtime_seconds"),
|
||||
"Unixtime mtime of textfiles successfully read.",
|
||||
[]string{"file"},
|
||||
nil,
|
||||
@@ -281,7 +281,7 @@ fileLoop:
|
||||
// Export if there were errors.
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
prometheus.NewDesc(
|
||||
"wmi_textfile_scrape_error",
|
||||
prometheus.BuildFQName(Namespace, "textfile", "scrape_error"),
|
||||
"1 if there was an error opening or reading a file, 0 otherwise",
|
||||
nil, nil,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user