# Logstash metrics using modules in Metricbeat

**URL:** <https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279>\
**Category:** Logstash\
**Created:** [January 3, 2024, 7:42am UTC](https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279 "2024-01-03T07:42:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maadhav/32/46127_2.png) [@maadhav](https://discuss.elastic.co/u/maadhav)\
**Post date:** [January 3, 2024, 7:42am UTC](https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279/1 "2024-01-03T07:42:40Z")

</div>

Hi Team

There are 2 modules in Metricbeat to collect Logstash metrics

- logstash
- logstash-xpack

Which module should be used ?

Regards

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [January 3, 2024, 9:29am UTC](https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279/2 "2024-01-03T09:29:16Z")

</div>

Hi,

logstash module: This is the basic module for collecting metrics from Logstash. If you're not using X-Pack features or you're using the open source version of Logstash, this is the module you should use.

logstash-xpack module: This module is specifically designed for collecting metrics from Logstash when it's running with X-Pack.

Regards.

---

<div class="post-metadata">

**Author:** ![maadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maadhav/32/46127_2.png) [@maadhav](https://discuss.elastic.co/u/maadhav)\
**Post date:** [January 3, 2024, 12:24pm UTC](https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279/3 "2024-01-03T12:24:59Z")

</div>

Thanks @yago82 , I enabled default logstash module, configured metricbeat to send output to elasticsearch cluster. I am able to see metrics with `metricset.name : "node"` but there are no metrics for `metricset.name : "node_stats"`, though both metric-stats are enabled. Any idea about this ?

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [January 3, 2024, 4:20pm UTC](https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279/4 "2024-01-03T16:20:33Z")

</div>

> [@maadhav](#):
>
> metricset.name : "node\_stats

Hi,

your config is something like this?

metricbeat.modules:

- module: logstash  
metricsets: ["node", "node\_stats"]  
enabled: true  
period: 10s  
hosts: ["localhost:9600"]

---

<div class="post-metadata">

**Author:** ![maadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maadhav/32/46127_2.png) [@maadhav](https://discuss.elastic.co/u/maadhav)\
**Post date:** [January 4, 2024, 5:41am UTC](https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279/5 "2024-01-04T05:41:29Z")

</div>

yes, similar config.  
what I observed is, if I stop logstash service, then I am able to see metrics for `node_stats` as well. Is this something related to log level ?

---

<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 1, 2024, 5:41am UTC](https://discuss.elastic.co/t/logstash-metrics-using-modules-in-metricbeat/350279/6 "2024-02-01T05:41:57Z")

</div>

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