Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metricbeat] Live reloading fails to reload keystore #33027

Closed
peterpramb opened this issue Sep 8, 2022 · 2 comments
Closed

[Metricbeat] Live reloading fails to reload keystore #33027

peterpramb opened this issue Sep 8, 2022 · 2 comments
Labels
Stalled Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@peterpramb
Copy link

peterpramb commented Sep 8, 2022

Beat version:
metricbeat version 7.17.6 (amd64), libbeat 7.17.6 [121b2ab96f118e6999f0a4be8e98827a809337db built 2022-08-23 12:50:12 +0000 UTC]

Description of the problem:
When adding new credentials to the keystore and then adding a new module config file referencing the new credentials to a live-reloading enabled and running Metricbeat instance, it fails to reload:

2022-09-08T21:20:19.666+0200 ERROR [reload] cfgfile/list.go:69 Unable to hash given config: missing field accessing '0.password' (source:'/path/to/metricbeat/conf/modules/elasticsearch.yml')

It seems that live reloading fails to take the modified keystore into account, before actually loading the new module config. This makes live reloading currently unusable with external credentials.

Note that this issue is different from similar issues mentioning that error message, as the error only appears with live reloading. When the Metricbeat instance is restarted, the configuration loads properly.

Steps to Reproduce:

  • conf/metricbeat.yml:
metricbeat.config.modules:
  path: "${APP_CONF}/modules/*.yml"
  reload.enabled: true
  reload.period: 60s
  • Run Metricbeat with APP_CONF=/path/to/metricbeat/conf
  • Add secrets:
echo "someuser" | metricbeat keystore add --stdin monitoring.es.username
echo "somepass" | metricbeat keystore add --stdin monitoring.es.password
  • conf/modules/elasticsearch.yml:
- module: elasticsearch
  xpack.enabled: true

  hosts:
  - https://es-host-name:9200/

  username: "${monitoring.es.username}"
  password: "${monitoring.es.password}"
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 8, 2022
@endorama endorama added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Sep 19, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 19, 2022
@botelastic
Copy link

botelastic bot commented Sep 19, 2023

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Sep 19, 2023
@botelastic botelastic bot closed this as completed Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stalled Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

3 participants