# Logstash monitoring with Metricbeat "logstash-xpack" module - data not collected and not sent to ES

**URL:** https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006
**Category:** Logstash
**Tags:** elastic-stack-monitoring
**Created:** [December 8, 2020, 2:15pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006 "2020-12-08T14:15:52Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Ilya\_Geller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilya_geller/32/52615_2.png) [@Ilya\_Geller](https://discuss.elastic.co/u/Ilya_Geller)
#### Post date: [December 8, 2020, 2:15pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/1 "2020-12-08T14:15:52Z")

</div>

Hi,  
I'm running version 7.7 of Logstash and Metricbeat, and I'm trying to setup stack monitoring using the metricbeat xpack modules.  
So far I've enabled the elasticsearch-xpack module and it works fine, ES and Kibana monitoring data is available in the Stack Monitoring view.  
However, for some reason logstash is not being monitored by metricbeat.

I know there was a similar post about this a couple of months ago but it was closed without a final solution.

I have ran the following command:  
` metricbeat test modules`

and everything returns ok for the logstash module for both `node` and `node_stats` metrics,  
but in ES the `.monitoring-logstash-*` is not created and logstash is not display in Stack Monitoring.

I have tried disabling and enabling the module and restarting metricbeat multiple times but nothing seems to work, and the log files in `/var/log/metricbeat/` don't show any errors as well, in fact there is not even any occurances of the word `logstash` in any of them.

What can I do about this?  
Thanks.

---

<div class="post-metadata">

### Author: ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)
#### Post date: [December 8, 2020, 2:33pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/2 "2020-12-08T14:33:00Z")

</div>

Hi @Ilya_Geller,

Can you share your list of enabled Metricbeat modules, via `metricbeat modules list`?

Assuming, `logstash` or `logstash-xpack` is enabled, can you also share that config too?

Lastly, can you also share your `metricbeat.yml` config? Feel free to scrub any sensitive information.

---

<div class="post-metadata">

### Author: ![Ilya\_Geller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilya_geller/32/52615_2.png) [@Ilya\_Geller](https://discuss.elastic.co/u/Ilya_Geller)
#### Post date: [December 8, 2020, 2:52pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/3 "2020-12-08T14:52:54Z")

</div>

Hi thanks for the reply,

```auto
metricbeat modules list
Enabled:
elasticsearch-xpack
logstash-xpack
system

Disabled:
...<All the rest>...

```

`logstash-xpack.yml`

```auto
- module: logstash
  metricsets:
    - node
    - node_stats
  period: 10s
  hosts: ["localhost:9600"]
  username: "<user>"
  password: "<password>"
  xpack.enabled: true

```

`metricbeat.yml`

```auto
output.elasticsearch:
  hosts: ["https://<myhost>:9200"]
  ssl.certificate_authorities: ["<path_to_ca_cert>"]
  protocol: "https"
  username: "<user>"
  password: "<password>"

```

Everything that's not mentioned above is default.

---

<div class="post-metadata">

### Author: ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)
#### Post date: [December 8, 2020, 3:09pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/4 "2020-12-08T15:09:21Z")

</div>

Thanks for that. Nothing stands out to be off there.

I'm assuming you've checked for any warnings/errors in the Metricbeat log file?

Assuming you did the above, let's see if debug logs will tell us anything more.

Can you try starting Metricbeat in debug mode (by appending `-d "*"` to the end of the command you use to start Metricbeat, such as `metricbeat -d "*"`) for about 15 seconds, then stopping Metricbeat and sharing the entire contents of the debug log?

---

<div class="post-metadata">

### Author: ![Ilya\_Geller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilya_geller/32/52615_2.png) [@Ilya\_Geller](https://discuss.elastic.co/u/Ilya_Geller)
#### Post date: [December 8, 2020, 3:34pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/5 "2020-12-08T15:34:04Z")

</div>

Ok so, I have tried running in debug mode, and looking at the logs a repeating error stands out:

```auto
DEBUG [publisher] pipeline/client.go:230 Pipeline client receives callback 'onDroppedOnPublish' for event:
...<EVENT>...
... Private:<nil> TimeSeries:true}

```

where `<EVENT>` seems to contain all the needed data extracted by the metricbeat module.  
Maybe this tells you anything?

---

<div class="post-metadata">

### Author: ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)
#### Post date: [December 8, 2020, 3:49pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/6 "2020-12-08T15:49:31Z")

</div>

If you run in regular mode (lose the `-d` option), do you see messages like this in the Metricbeat server log file:

```auto
2020-12-08T10:48:48.304-0500	INFO	[monitoring]	log/log.go:145	Non-zero metrics in the last 30s	{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":156,"time":{"ms":81}},"total":{"ticks":644,"time":{"ms":148},"value":644},"user":{"ticks":488,"time":{"ms":67}}},"info":{"ephemeral_id":"fe599f11-d5ad-40e6-943e-2f46c14721c6","uptime":{"ms":60047}},"memstats":{"gc_next":12526624,"memory_alloc":10234848,"memory_total":68773016,"rss":2220032},"runtime":{"goroutines":32}},"libbeat":{"config":{"module":{"running":1}},"output":{"events":{"acked":3,"batches":6,"duplicates":12,"total":15},"read":{"bytes":5982},"write":{"bytes":49807}},"pipeline":{"clients":2,"events":{"active":0,"published":15,"total":15},"queue":{"acked":15}}},"metricbeat":{"logstash":{"node":{"events":12,"success":12},"node_stats":{"events":3,"success":3}}},"system":{"load":{"1":8.5332,"15":17.4814,"5":23.2773,"norm":{"1":0.5333,"15":1.0926,"5":1.4548}}}}}}

```

If so, can you share them? They should appear every ~10s when new data is pushed to Elasticsearch.

---

<div class="post-metadata">

### Author: ![Ilya\_Geller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilya_geller/32/52615_2.png) [@Ilya\_Geller](https://discuss.elastic.co/u/Ilya_Geller)
#### Post date: [December 8, 2020, 4:08pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/7 "2020-12-08T16:08:31Z")

</div>

So apparently there is some issue with the built in `remote_monitoring_user` permissions for the `metricbeat-*` index.

I have manually added the `all` permission for `metricbeat-*` for the user through Kibana, restarted metricbeat and all of the sudden the missing logstash index was created and now Logstash appears in Stack Monitoring.

I guess something was missing and it couldn't create new indeces but that is weird since the ES and kibana indeces were created nontheless.

I have also manually added the `read_ilm` cluster privilege since metricbeat was complaining it could not retrieve the `ILM policy`, and also noticed repeating `...failed to check for alias 'metricbeat-7.7.0'... action [indeces:admin/aliases/get] is unauthorized for user`

Could you get someone on the Elastic team to look into that?  
For me its not a big deal to leave it like that, but this is probably something that needs to be checked.

---

<div class="post-metadata">

### Author: ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)
#### Post date: [December 8, 2020, 6:18pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/8 "2020-12-08T18:18:03Z")

</div>

The `-xpack` stack product modules (such as `logstash-xpack` and `elasticsearch-xpack`) do not index into `metricbeat-*`, but rather into custom, stack monitoring indices named `.monitoring-*`.

If you are seeing an issue with `metricbeat-*` indices, it must be due to another Metricbeat module (which, for you, looks like `system`).

Do you need the `system` module? If not, try disabling that and reverting the permission changes.

---

<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: [January 5, 2021, 6:18pm UTC](https://discuss.elastic.co/t/logstash-monitoring-with-metricbeat-logstash-xpack-module-data-not-collected-and-not-sent-to-es/258006/9 "2021-01-05T18:18:17Z")

</div>

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