# Meticbeat can not collect all metric for MSSQL perfomance counter

**URL:** <https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [September 6, 2022, 6:25am UTC](https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742 "2022-09-06T06:25:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sondog](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sondog](https://discuss.elastic.co/u/sondog)\
**Post date:** [September 6, 2022, 6:25am UTC](https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742/1 "2022-09-06T06:25:54Z")

</div>

Elasticsearch Version : 8.0.0  
Kbana Version : 8.0.0  
Metricbeat Version : 8.0.0  
MSSQL version : Micvrosoft SQL Server 2017

> **[MSSQL performance metricset | Metricbeat Reference \[8.0\] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/8.0/metricbeat-metricset-mssql-performance.html)**

in documentaion,  
metricbeat can collect 16 metric for performance counter

but,  
i can get only 6 metric(even buffer.cache\_hit, buffer.page\_life\_expectancy is null)

![2022-09-06 14 52 47](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b634d93cdb2d250bf6909eba4dba503f1a625ae5.png)

is there any solution?

or

could i get collecting logic MSSQL perfomance counter ? (i couldn't find source at github)

thanks

---

<div class="post-metadata">

**Author:** ![Manoj\_S\_Shetty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manoj_s_shetty/32/101950_2.png) [@Manoj\_S\_Shetty](https://discuss.elastic.co/u/Manoj_S_Shetty)\
**Post date:** [September 7, 2022, 9:06am UTC](https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742/2 "2022-09-07T09:06:39Z")

</div>

Hi @sondog ,

Can you please paste the output of the below SQL query for MSSQL server:

```auto
SELECT * FROM sys.dm_os_performance_counters WHERE counter_name = 'Page life expectancy' AND object_name like '%Buffer Manager%'"

```

Thank you

---

<div class="post-metadata">

**Author:** ![sondog](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sondog](https://discuss.elastic.co/u/sondog)\
**Post date:** [September 8, 2022, 1:23am UTC](https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742/3 "2022-09-08T01:23:44Z")

</div>

Hello, @Manoj_S_Shetty

 ![2022-09-08 10 22 08](https://us1.discourse-cdn.com/elastic/original/3X/3/8/38e6a96833c1d8023462b08051d6639fba88574c.png)

Thank you

---

<div class="post-metadata">

**Author:** ![sondog](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sondog](https://discuss.elastic.co/u/sondog)\
**Post date:** [September 13, 2022, 2:47am UTC](https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742/4 "2022-09-13T02:47:08Z")

</div>

Hi @Manoj_S_Shetty,

Could i know SQL query collects each metric?

ex)  
mssql.performance.buffer.page\_life\_expectancy.sec (metricbeat field)  
\<-\>  
SELECT cntr-value FROM sys.dm\_os\_performance\_counters WHERE counter\_name = 'Page life expectancy' (MSSQL SQL Query)

please let me know about collecting file path in github

thank you

---

<div class="post-metadata">

**Author:** ![Manoj\_S\_Shetty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manoj_s_shetty/32/101950_2.png) [@Manoj\_S\_Shetty](https://discuss.elastic.co/u/Manoj_S_Shetty)\
**Post date:** [September 13, 2022, 4:58am UTC](https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742/5 "2022-09-13T04:58:07Z")

</div>

@sondog Can we see your mssql config yaml file ?

Path: [beats/performance.go at main · elastic/beats · GitHub](https://github.com/elastic/beats/blob/main/x-pack/metricbeat/module/mssql/performance/performance.go)

---

<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:** [October 11, 2022, 6:58am UTC](https://discuss.elastic.co/t/meticbeat-can-not-collect-all-metric-for-mssql-perfomance-counter/313742/6 "2022-10-11T06:58:27Z")

</div>

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