From bd5c859fd7d08da676305c4199f4a8ac7e84b7cf Mon Sep 17 00:00:00 2001 From: Thomas Casteleyn Date: Thu, 3 Feb 2022 17:33:38 +0100 Subject: [PATCH] style: Add deprecated warning and version to win_perf_counters option (#10579) --- plugins/inputs/win_perf_counters/README.md | 2 +- plugins/inputs/win_perf_counters/win_perf_counters.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/inputs/win_perf_counters/README.md b/plugins/inputs/win_perf_counters/README.md index 3d3b16768..15d6363d4 100644 --- a/plugins/inputs/win_perf_counters/README.md +++ b/plugins/inputs/win_perf_counters/README.md @@ -87,7 +87,7 @@ Example: #### PreVistaSupport -(Deprecated. Necessary features on Windows Vista and newer are checked dynamically) +(Deprecated in 1.7; Necessary features on Windows Vista and newer are checked dynamically) Bool, if set to `true`, the plugin will use the localized PerfCounter interface that has been present since before Vista for backwards compatibility. diff --git a/plugins/inputs/win_perf_counters/win_perf_counters.go b/plugins/inputs/win_perf_counters/win_perf_counters.go index 9cf45a256..4effb3bc0 100644 --- a/plugins/inputs/win_perf_counters/win_perf_counters.go +++ b/plugins/inputs/win_perf_counters/win_perf_counters.go @@ -150,9 +150,8 @@ var sampleConfig = ` ` type Win_PerfCounters struct { - PrintValid bool - //deprecated: determined dynamically - PreVistaSupport bool + PrintValid bool `toml:"PrintValid"` + PreVistaSupport bool `toml:"PreVistaSupport" deprecated:"1.7.0;determined dynamically"` UsePerfCounterTime bool Object []perfobject CountersRefreshInterval config.Duration