# Setting up Metricbeat to pull Exchange Perfmon

**URL:** <https://discuss.elastic.co/t/setting-up-metricbeat-to-pull-exchange-perfmon/261845>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 21, 2021, 7:36pm UTC](https://discuss.elastic.co/t/setting-up-metricbeat-to-pull-exchange-perfmon/261845 "2021-01-21T19:36:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zachswill](https://avatars.discourse-cdn.com/v4/letter/z/aca169/32.png) [@zachswill](https://discuss.elastic.co/u/zachswill)\
**Post date:** [January 21, 2021, 7:36pm UTC](https://discuss.elastic.co/t/setting-up-metricbeat-to-pull-exchange-perfmon/261845/1 "2021-01-21T19:36:17Z")

</div>

Trying to get Metricbeat to collect the exchange perfmon counters. Here is my current config. Any thoughts? I am getting counter not found.

- module: windows  
metricsets: [perfmon]  
period: 30s  
perfmon.ignore\_non\_existent\_counters: true  
perfmon.group\_measurements\_by\_instance: true  
perfmon.queries:
  - object: "MSExchange Delivery SmtpSend"  
instance: "[Messages Sent/sec]"  
counters:
    - name: "Messages Sent/sec"  
field: "Rateofcountspersecond32"  
format: "float"

  - object: "MSExchange Delivery SmtpReceive"  
instance: "[Messages Received/sec]"  
counters:
    - name: "Messages Received/sec"  
field: "Rateofcountspersecond32"  
format: "float"

  - object: "MSExchange Delivery SmtpReceive"  
instance: "[Connections Current]"  
counters:
    - name: "Connections Current"  
field: "NumberOfItems32"  
format: "float"

  - object: "MSExchange Delivery SmtpReceive"  
instance: "[Number of times MaxInboundConnectionExceededPerSource limit reached  
last hour]"  
counters:
    - name: "Number of times MaxInboundConnectionExceededPerSource limit reached last hour"  
field: "NumberOfItems32"  
format: "float"

---

<div class="post-metadata">

**Author:** ![MarianaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marianad/32/42687_2.png) [@MarianaD](https://discuss.elastic.co/u/MarianaD)\
**Post date:** [January 25, 2021, 1:56pm UTC](https://discuss.elastic.co/t/setting-up-metricbeat-to-pull-exchange-perfmon/261845/2 "2021-01-25T13:56:28Z")

</div>

hi @zachswill, it looks like based on the configuration above the counter path is not correct or the service is not installed on your machine.  
So, for example, your first `perfmon.queries` entry would build the following counter path `\MSExchange Delivery SmtpSend(Messages Sent/sec)\Messages Sent/sec` . As you noticed the instance name is not correct (the text between the parentheses).  
The instance name is the name of the performance counter category instance, some counters also lack an instance name.  
If you are not sure what the instance names are for this counter `MSExchange Delivery SmtpSend` or the rest of the counters in the list, you can have a look in the Performance Monitor app at the counter level or use the `Get-Counter` command with the right flags in PowerShell to get more info there.  
If you want to get the metrics for all instances in Metricbeat, you can use the wildcard `*`.

---

<div class="post-metadata">

**Author:** ![zachswill](https://avatars.discourse-cdn.com/v4/letter/z/aca169/32.png) [@zachswill](https://discuss.elastic.co/u/zachswill)\
**Post date:** [January 26, 2021, 1:44pm UTC](https://discuss.elastic.co/t/setting-up-metricbeat-to-pull-exchange-perfmon/261845/3 "2021-01-26T13:44:07Z")

</div>

Thanks that got it!

---

<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:** [February 23, 2021, 3:44pm UTC](https://discuss.elastic.co/t/setting-up-metricbeat-to-pull-exchange-perfmon/261845/4 "2021-02-23T15:44:12Z")

</div>

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