# Win\_perf\_counters doesn't support multiple instances?

**URL:** <https://community.influxdata.com/t/win-perf-counters-doesnt-support-multiple-instances/2567>\
**Category:** Telegraf\
**Tags:** telegraf, windows\
**Created:** [October 4, 2017, 10:56am UTC](https://community.influxdata.com/t/win-perf-counters-doesnt-support-multiple-instances/2567 "2017-10-04T10:56:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![absolutejam](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/absolutejam/32/1832_2.png) [@absolutejam](https://community.influxdata.com/u/absolutejam)\
**Post date:** [October 4, 2017, 10:56am UTC](https://community.influxdata.com/t/win-perf-counters-doesnt-support-multiple-instances/2567/1 "2017-10-04T10:56:14Z")

</div>

Hey guys,

I wanted to start here before I filed an issue on GitHub. I’ve been toying with deploying Telegraf configs with SaltStack and I’ve split some of the Windows performance counters into separate `.conf` files, and Telegraf is called with `--config-directory` flag.

However, after some hair-pulling, it looks like only the last file containing the inputs is actually being shipped to InfluxDB.

For example:

```auto
221_inputs_winperf_generic.conf

###############################################################################
# INPUT PLUGINS #
###############################################################################

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

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

  [[inputs.win_perf_counters.object]]
    Instances = ["*"]
    Counters = ["Bytes Received/sec", "Bytes Sent/sec", "Current Bandwidth", "Output Queue Length"]
    ObjectName = "Network Interface"
    Measurement = "winperf_networkinterface"

  [[inputs.win_perf_counters.object]]
    Instances = ["*"]
    Counters = ["% Idle Time", "% Interrupt Time", "% Privileged Time", "% User Time", "% Processor Time"]
    ObjectName = "Processor"
    Measurement = "winperf_processor"

  [[inputs.win_perf_counters.object]]
    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"]
    ObjectName = "Memory"
    Measurement = "winperf_memory"

```

```auto
222_inputs_winperf_processes.conf

[[inputs.win_perf_counters]]
  [[inputs.win_perf_counters.object]]
    ObjectName = "Process"
    Counters = [
      "% Processor Time",
      "Handle Count",
      "Private Bytes",
      "Thread Count",
      "Virtual Bytes",
      "Working Set"
    ]
    Instances = ["*"]
    Measurement = "winperf_proc"
    #IncludeTotal=false #Set to true to include _Total instance when querying for all (*).

```

I wanted to be able to split these out into separate `[[inputs.win_perf_counters]]` sections as I wanted to apply tags for each one (And route to different databases if needed), and I also have some counters that I will only apply to specific hosts (Eg. IIS).

As a temporary workaround, I even tried omitting the `[[inputs.win_perf_counters]]` header on my second file, hoping that when the `conf.d` directory is processed, the files are essentially just merged and it would assume the second file is still under this header. However, this doesn’t seem to be working either, so my only option is to merge the configs for now.

I’m currently running Telegraf agent 1.1.0 as when I tried to upgrade recently, it kept failing and this was the last known good binary I had to hand.

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [October 4, 2017, 5:53pm UTC](https://community.influxdata.com/t/win-perf-counters-doesnt-support-multiple-instances/2567/2 "2017-10-04T17:53:37Z")

</div>

This [issue](https://github.com/influxdata/telegraf/issues/1137) was fixed in version 1.4.

---

<div class="post-metadata">

**Author:** ![absolutejam](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/absolutejam/32/1832_2.png) [@absolutejam](https://community.influxdata.com/u/absolutejam)\
**Post date:** [October 4, 2017, 6:34pm UTC](https://community.influxdata.com/t/win-perf-counters-doesnt-support-multiple-instances/2567/3 "2017-10-04T18:34:29Z")

</div>

Is the issue with win\_perf\_counters crashing out resolved too? Couldn’t see it in change log but I’ve seen an issue

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [October 4, 2017, 9:00pm UTC](https://community.influxdata.com/t/win-perf-counters-doesnt-support-multiple-instances/2567/4 "2017-10-04T21:00:04Z")

</div>

I’m not sure, we do have a number of [known issues for this plugin](https://github.com/influxdata/telegraf/labels/area%2Fwin_perf_counters) and I don’t remember a crash fix. If you don’t see an open issue for your problem could you create one?

---

<div class="post-metadata">

**Author:** ![absolutejam](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/absolutejam/32/1832_2.png) [@absolutejam](https://community.influxdata.com/u/absolutejam)\
**Post date:** [October 5, 2017, 9:01pm UTC](https://community.influxdata.com/t/win-perf-counters-doesnt-support-multiple-instances/2567/5 "2017-10-05T21:01:46Z")

</div>

Looks like all is well with 1.4.1!

Thanks
