mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-23 13:16:36 +00:00
system: remove windows_system_boot_time_timestamp_seconds (#2112)
This commit is contained in:
@@ -81,8 +81,6 @@ type Collector struct {
|
|||||||
poolBytes *prometheus.Desc
|
poolBytes *prometheus.Desc
|
||||||
priorityBase *prometheus.Desc
|
priorityBase *prometheus.Desc
|
||||||
privateBytes *prometheus.Desc
|
privateBytes *prometheus.Desc
|
||||||
// Deprecated: Use start_time_seconds_timestamp instead
|
|
||||||
startTimeOld *prometheus.Desc
|
|
||||||
startTime *prometheus.Desc
|
startTime *prometheus.Desc
|
||||||
threadCount *prometheus.Desc
|
threadCount *prometheus.Desc
|
||||||
virtualBytes *prometheus.Desc
|
virtualBytes *prometheus.Desc
|
||||||
@@ -221,13 +219,6 @@ func (c *Collector) Build(logger *slog.Logger, miSession *mi.Session) error {
|
|||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
|
|
||||||
c.startTimeOld = prometheus.NewDesc(
|
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "start_time"),
|
|
||||||
"DEPRECATED: Use start_time_seconds_timestamp instead",
|
|
||||||
[]string{"process", "process_id"},
|
|
||||||
nil,
|
|
||||||
)
|
|
||||||
|
|
||||||
c.startTime = prometheus.NewDesc(
|
c.startTime = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "start_time_seconds_timestamp"),
|
prometheus.BuildFQName(types.Namespace, Name, "start_time_seconds_timestamp"),
|
||||||
"Time of process start.",
|
"Time of process start.",
|
||||||
|
|||||||
@@ -146,13 +146,6 @@ func (c *Collector) collectWorker() {
|
|||||||
|
|
||||||
startTime := float64(time.Now().UnixMicro())/1e6 - data.ElapsedTime
|
startTime := float64(time.Now().UnixMicro())/1e6 - data.ElapsedTime
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
|
||||||
c.startTimeOld,
|
|
||||||
prometheus.GaugeValue,
|
|
||||||
startTime,
|
|
||||||
name, pidString,
|
|
||||||
)
|
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.startTime,
|
c.startTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -52,10 +52,8 @@ type Collector struct {
|
|||||||
processes *prometheus.Desc
|
processes *prometheus.Desc
|
||||||
processesLimit *prometheus.Desc
|
processesLimit *prometheus.Desc
|
||||||
systemCallsTotal *prometheus.Desc
|
systemCallsTotal *prometheus.Desc
|
||||||
// Deprecated: Use windows_system_boot_time_timestamp instead
|
bootTime *prometheus.Desc
|
||||||
bootTimeSeconds *prometheus.Desc
|
threads *prometheus.Desc
|
||||||
bootTime *prometheus.Desc
|
|
||||||
threads *prometheus.Desc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(config *Config) *Collector {
|
func New(config *Config) *Collector {
|
||||||
@@ -91,12 +89,6 @@ func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
|||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
c.bootTimeSeconds = prometheus.NewDesc(
|
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "boot_time_timestamp_seconds"),
|
|
||||||
"Deprecated: Use windows_system_boot_time_timestamp instead",
|
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
)
|
|
||||||
c.contextSwitchesTotal = prometheus.NewDesc(
|
c.contextSwitchesTotal = prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(types.Namespace, Name, "context_switches_total"),
|
prometheus.BuildFQName(types.Namespace, Name, "context_switches_total"),
|
||||||
"Total number of context switches (WMI source: PerfOS_System.ContextSwitchesPersec)",
|
"Total number of context switches (WMI source: PerfOS_System.ContextSwitchesPersec)",
|
||||||
@@ -199,12 +191,6 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
c.perfDataObject[0].Threads,
|
c.perfDataObject[0].Threads,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
|
||||||
c.bootTimeSeconds,
|
|
||||||
prometheus.GaugeValue,
|
|
||||||
c.bootTimeTimestamp,
|
|
||||||
)
|
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.bootTime,
|
c.bootTime,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
@@ -387,8 +387,6 @@ windows_service_state{name="Themes",state="stop pending"} 0
|
|||||||
windows_service_state{name="Themes",state="stopped"} 0
|
windows_service_state{name="Themes",state="stopped"} 0
|
||||||
# HELP windows_system_boot_time_timestamp Unix timestamp of system boot time
|
# HELP windows_system_boot_time_timestamp Unix timestamp of system boot time
|
||||||
# TYPE windows_system_boot_time_timestamp gauge
|
# TYPE windows_system_boot_time_timestamp gauge
|
||||||
# HELP windows_system_boot_time_timestamp_seconds Deprecated: Use windows_system_boot_time_timestamp instead
|
|
||||||
# TYPE windows_system_boot_time_timestamp_seconds gauge
|
|
||||||
# HELP windows_system_context_switches_total Total number of context switches (WMI source: PerfOS_System.ContextSwitchesPersec)
|
# HELP windows_system_context_switches_total Total number of context switches (WMI source: PerfOS_System.ContextSwitchesPersec)
|
||||||
# TYPE windows_system_context_switches_total counter
|
# TYPE windows_system_context_switches_total counter
|
||||||
# HELP windows_system_exception_dispatches_total Total number of exceptions dispatched (WMI source: PerfOS_System.ExceptionDispatchesPersec)
|
# HELP windows_system_exception_dispatches_total Total number of exceptions dispatched (WMI source: PerfOS_System.ExceptionDispatchesPersec)
|
||||||
|
|||||||
Reference in New Issue
Block a user