# Metricbeat / windows - perfmon counter

**URL:** <https://discuss.elastic.co/t/metricbeat-windows-perfmon-counter/175251>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [April 3, 2019, 5:26pm UTC](https://discuss.elastic.co/t/metricbeat-windows-perfmon-counter/175251 "2019-04-03T17:26:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reb](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@Reb](https://discuss.elastic.co/u/Reb)\
**Post date:** [April 3, 2019, 5:26pm UTC](https://discuss.elastic.co/t/metricbeat-windows-perfmon-counter/175251/1 "2019-04-03T17:26:48Z")

</div>

hi ,

for my windows module (metricset: perfmon), do I have to fill in the counter in the metricbeat.yml  
Because I would like to do that in the configuration of the windows module, but not in the metricbeat.yml.

```
    metricbeat.config.modules:
  # Glob pattern for configuration loading
  path: c:\\ProgramData\\metricbeat\\modules.d\\*.yml

  # Set to true to enable config reloading
  reload.enabled: true

  # Period on which files under path should be checked for changes
  reload.period: 10s

#============================== modules =====================================
metricbeat.modules:

- module: windows
  metricsets: ["perfmon"]
  enabled: true
  period: 10s
  perfmon.ignore_non_existent_counters: true
  perfmon.counters:
    - instance_label: processor.name
      instance_name: total
      measurement_label: processor.time.total.pct
      query: '\Processor Information(_Total)\% Processor Time'

```

> Blockquote

if i define the same counter in the windows.yml, why i can't take it back if i don't define it in metricbeat.yml

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 19, 2019, 8:47pm UTC](https://discuss.elastic.co/t/metricbeat-windows-perfmon-counter/175251/2 "2019-04-19T20:47:31Z")

</div>

Hi @Reb,

You should be able to place the same configuration in a yml file inside your `modules.d` directory. If you include files from `c:\ProgramData\metricbeat\modules.d\*.yml` you shouldn't need to define `metricbeat.modules` too.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 17, 2019, 8:47pm UTC](https://discuss.elastic.co/t/metricbeat-windows-perfmon-counter/175251/3 "2019-05-17T20:47:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
