# Input plugin to counterPath Performance Counters on Windows operating systems
# This plugin ONLY supports Windows
[[inputs.win_perf_counters]]
  ## By default this plugin returns basic CPU and Disk statistics. See the
  ## README file for more examples. Uncomment examples below or write your own
  ## as you see fit. If the system being polled for data does not have the
  ## Object at startup of the Telegraf agent, it will not be gathered.

  ## Print All matching performance counters
  # PrintValid = false

  ## Whether request a timestamp along with the PerfCounter data or 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 = []

  ## Maximum size of the buffer for values returned by the API
  ## Increase this value if you experience "buffer limit reached" errors.
  # MaxBufferSize = "4MiB"

  ## NOTE: Due to the way TOML is parsed, tables must be at the END of the
  ## plugin definition, otherwise additional config options are read as part of
  ## the table

  # [[inputs.win_perf_counters.object]]
    # Measurement = ""
    # ObjectName = ""
    # Instances = [""]
    # Counters = []
    ## Additional Object Settings
    ##   * IncludeTotal: set to true to include _Total instance when querying
    ##                   for all metrics via '*'
    ##   * WarnOnMissing: print out when the performance counter is missing
    ##                    from object, counter or instance
    ##   * UseRawValues: gather raw values instead of formatted. Raw values are
    ##                   stored in the field name with the "_Raw" suffix, e.g.
    ##                   "Disk_Read_Bytes_sec_Raw".
    # IncludeTotal = false
    # WarnOnMissing = false
    # UseRawValues = false

  ## Processor usage, alternative to native, reports on a per core.
  # [[inputs.win_perf_counters.object]]
    # Measurement = "win_cpu"
    # ObjectName = "Processor"
    # Instances = ["*"]
    # UseRawValues = true
    # Counters = [
    #   "% Idle Time",
    #   "% Interrupt Time",
    #   "% Privileged Time",
    #   "% User Time",
    #   "% Processor Time",
    #   "% DPC Time",
    # ]

  ## Disk times and queues
  # [[inputs.win_perf_counters.object]]
    # Measurement = "win_disk"
    # ObjectName = "LogicalDisk"
    # Instances = ["*"]
    # Counters = [
    #   "% Idle Time",
    #   "% Disk Time",
    #   "% Disk Read Time",
    #   "% Disk Write Time",
    #   "% User Time",
    #   "% Free Space",
    #   "Current Disk Queue Length",
    #   "Free Megabytes",
    # ]

  # [[inputs.win_perf_counters.object]]
    # Measurement = "win_diskio"
    # 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",
    # ]

  # [[inputs.win_perf_counters.object]]
    # Measurement = "win_net"
    # 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",
    # ]

  # [[inputs.win_perf_counters.object]]
    # Measurement = "win_system"
    # ObjectName = "System"
    # Instances = ["------"]
    # Counters = [
    #   "Context Switches/sec",
    #   "System Calls/sec",
    #   "Processor Queue Length",
    #   "System Up Time",
    # ]

  ## Example counterPath where the Instance portion must be removed to get
  ## data back, such as from the Memory object.
  # [[inputs.win_perf_counters.object]]
    # Measurement = "win_mem"
    # ObjectName = "Memory"
    ## Use 6 x - to remove the Instance bit from the counterPath.
    # Instances = ["------"]
    # 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",
    # ]

  ## Example query where the Instance portion must be removed to get data back,
  ## such as from the Paging File object.
  # [[inputs.win_perf_counters.object]]
    # Measurement = "win_swap"
    # ObjectName = "Paging File"
    # Instances = ["_Total"]
    # Counters = [
    #   "% Usage",
    # ]
