It is recommended NOT to use this on OSes starting with Vista and newer because it requires more configuration to use this than the newer interface present since Vista.
Example for Windows Server 2003, this would be set to true:
IgnoredErrors accepts a list of PDH error codes which are defined in pdh.go, if this error is encountered it will be ignored.
For example, you can provide "PDH_NO_DATA" to ignore performance counters with no instances, but by default no errors are ignored.
You can find the list of possible errors here: [PDH errors](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/win_perf_counters/pdh.go)
If set to `true`, counter values will be provided in the raw, integer, form. This is in contrast with the default behavior, where values are returned in a formatted, displayable, form
as seen in the Windows Performance Monitor.
A field representing raw counter value has the `_Raw` suffix. Raw values should be further used in a calculation, e.g. `100-(non_negative_derivative("Percent_Processor_Time_Raw",1s)/100000`
Note: Time based counters (i.e. _% Processor Time_) are reported in hundredths of nanoseconds.
# # Whether request a timestamp along with the PerfCounter data or just use current time
# # UsePerfCounterTime=true
# # If UseWildcardsExpansion params is set to true, wildcards (partial wildcards in instance names and wildcards in counters names) in configured counter paths will be expanded
# # and in case of localized Windows, counter paths will be also localized. It also returns instance indexes in instance names.
# # If false, wildcards (not partial) in instance names will still be expanded, but instance indexes will not be returned in instance names.
# #UseWildcardsExpansion = false
# # When running on a localized version of Windows and with UseWildcardsExpansion = true, Windows will
# # localize object and counter names. When LocalizeWildcardsExpansion = false, use the names in object.Counters instead
# # of the localized names. Only Instances can have wildcards in this case. ObjectName and Counters must not have wildcards when this
# # setting is false.
# #LocalizeWildcardsExpansion = true
# # Period after which counters will be reread from configuration and wildcards in counter paths expanded
# CountersRefreshInterval="1m"
# ## Accepts a list of PDH error codes which are defined in pdh.go, if this error is encountered it will be ignored
# ## For example, you can provide "PDH_NO_DATA" to ignore performance counters with no instances
# ## By default no errors are ignored
# ## You can find the list here: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/win_perf_counters/pdh.go
# ## e.g.: IgnoredErrors = ["PDH_NO_DATA"]
# # IgnoredErrors = []
#
# [[inputs.win_perf_counters.object]]
# # Processor usage, alternative to native, reports on a per core.
# ObjectName = "Processor"
# Instances = ["*"]
# Counters = [
# "% Idle Time",
# "% Interrupt Time",
# "% Privileged Time",
# "% User Time",
# "% Processor Time",
# "% DPC Time",
# ]
# Measurement = "win_cpu"
# # Set to true to include _Total instance when querying for all (*).
# # IncludeTotal=false
# # Print out when the performance counter is missing from object, counter or instance.
# # WarnOnMissing = false
# # Gather raw values instead of formatted. Raw value is stored in the field name with the "_Raw" suffix, e.g. "Disk_Read_Bytes_sec_Raw".
# # UseRawValues = true
#
# [[inputs.win_perf_counters.object]]
# # Disk times and queues
# ObjectName = "LogicalDisk"
# Instances = ["*"]
# Counters = [
# "% Idle Time",
# "% Disk Time",
# "% Disk Read Time",
# "% Disk Write Time",
# "% User Time",
# "% Free Space",
# "Current Disk Queue Length",
# "Free Megabytes",
# ]
# Measurement = "win_disk"
#
# [[inputs.win_perf_counters.object]]
# ObjectName = "PhysicalDisk"
# Instances = ["*"]
# Counters = [
# "Disk Read Bytes/sec",
# "Disk Write Bytes/sec",
# "Current Disk Queue Length",
# "Disk Reads/sec",
# "Disk Writes/sec",
# "% Disk Time",
# "% Disk Read Time",
# "% Disk Write Time",
# ]
# Measurement = "win_diskio"
#
# [[inputs.win_perf_counters.object]]
# ObjectName = "Network Interface"
# Instances = ["*"]
# Counters = [
# "Bytes Received/sec",
# "Bytes Sent/sec",
# "Packets Received/sec",
# "Packets Sent/sec",
# "Packets Received Discarded",
# "Packets Outbound Discarded",
# "Packets Received Errors",
# "Packets Outbound Errors",
# ]
# Measurement = "win_net"
#
#
# [[inputs.win_perf_counters.object]]
# ObjectName = "System"
# Counters = [
# "Context Switches/sec",
# "System Calls/sec",
# "Processor Queue Length",
# "System Up Time",
# ]
# Instances = ["------"]
# Measurement = "win_system"
#
# [[inputs.win_perf_counters.object]]
# # Example counterPath where the Instance portion must be removed to get data back,
# # such as from the Memory object.
# ObjectName = "Memory"
# Counters = [
# "Available Bytes",
# "Cache Faults/sec",
# "Demand Zero Faults/sec",
# "Page Faults/sec",
# "Pages/sec",
# "Transition Faults/sec",
# "Pool Nonpaged Bytes",
# "Pool Paged Bytes",
# "Standby Cache Reserve Bytes",
# "Standby Cache Normal Priority Bytes",
# "Standby Cache Core Bytes",
# ]
# Instances = ["------"] # Use 6 x - to remove the Instance bit from the counterPath.
# Measurement = "win_mem"
#
# [[inputs.win_perf_counters.object]]
# # Example query where the Instance portion must be removed to get data back,
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
[[inputs.win_perf_counters.object]]
# IIS, ASP.NET Applications
ObjectName = "ASP.NET Applications"
Counters = ["Cache Total Entries","Cache Total Hit Ratio","Cache Total Turnover Rate","Output Cache Entries","Output Cache Hits","Output Cache Hit Ratio","Output Cache Turnover Rate","Compilations Total","Errors Total/Sec","Pipeline Instance Count","Requests Executing","Requests in Application Queue","Requests/Sec"]
Instances = ["*"]
Measurement = "win_aspnet_app"
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
[[inputs.win_perf_counters.object]]
# .NET CLR Jit, in this case for IIS only
ObjectName = ".NET CLR Jit"
Counters = ["% Time in Jit","IL Bytes Jitted / sec"]
Instances = ["w3wp"]
Measurement = "win_dotnet_jit"
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
[[inputs.win_perf_counters.object]]
# .NET CLR Loading, in this case for IIS only
ObjectName = ".NET CLR Loading"
Counters = ["% Time Loading"]
Instances = ["w3wp"]
Measurement = "win_dotnet_loading"
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
[[inputs.win_perf_counters.object]]
# .NET CLR LocksAndThreads, in this case for IIS only
ObjectName = ".NET CLR LocksAndThreads"
Counters = ["# of current logical Threads","# of current physical Threads","# of current recognized threads","# of total recognized threads","Queue Length / sec","Total # of Contentions","Current Queue Length"]
Instances = ["w3wp"]
Measurement = "win_dotnet_locks"
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
[[inputs.win_perf_counters.object]]
# .NET CLR Memory, in this case for IIS only
ObjectName = ".NET CLR Memory"
Counters = ["% Time in GC","# Bytes in all Heaps","# Gen 0 Collections","# Gen 1 Collections","# Gen 2 Collections","# Induced GC","Allocated Bytes/sec","Finalization Survivors","Gen 0 heap size","Gen 1 heap size","Gen 2 heap size","Large Object Heap size","# of Pinned Objects"]
Instances = ["w3wp"]
Measurement = "win_dotnet_mem"
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).
[[inputs.win_perf_counters.object]]
# .NET CLR Security, in this case for IIS only
ObjectName = ".NET CLR Security"
Counters = ["% Time in RT checks","Stack Walk Depth","Total Runtime Checks"]
Instances = ["w3wp"]
Measurement = "win_dotnet_security"
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*).