Intermittent warning during pipeline startup. The worker_millis_per_event metric fails to register but pipeline functions normally.
[org.logstash.execution.AbstractPipelineExt] Metric registration error: `worker_millis_per_event` could not be registered in namespace `[:stats, :pipelines, :logstash, :plugins, :filters, :c13c16377fd9a15e6e691284665f2da3494b42273b1fc6e37b6330fff12eb5ab, :flow]`
Observed Behavior
Not consistently reproducible - Occurs intermittently during startup
No functional impact - Pipeline processes events normally
Metrics not available - Pipeline stats are empty from endpoint localhost:9600/_node/stats/pipelines { "host": "log-transformer", "version": "9.0.3", "http_address": "0.0.0.0:9600", "id": "5fbd8fxxxxxxxxxxxx5602", "name": "log-transformer", "ephemeral_id": "36axxxxxxxxxxxxxxxxx2348a7", "snapshot": false, "status": "unknown", "pipeline": { "workers": 2, "batch_size": 2048, "batch_delay": 50 }, "pipelines": {} }
Self-resolving: Logstash process restart with same configuration succeeds without error. No warning message and stats are also available in /_node/stats/pipelines endpoint.
Versions
Logstash: 9.0.3
JRuby: 9.4.9.0
JVM: OpenJDK17
Questions
Is this a known race condition during pipeline initialization?
Can you try at least add: xpack.monitoring.allow_legacy_collection: true
You can check the line which raise an error. Not sure what's happening here because of Java. Long time ago I had a case, which was resolved by installing Oracle JDK not OpenJDK.
Anyone other had similar issues? Badger, Leandro, any suggestions?
Currently, testing Logstash with xpack.monitoring.allow_legacy_collection: true parameter. Will share the observations shortly.
Regarding log4j2.properties, we are not using any properties related to routing/rolling/json_rolling. So those changes are not relevant to us at least. Snippet from our log4j2.properties file.
Yes you have abs. right, OSS doesn't support x-pack.
However, I found info that APIs should work, but cannot find an official confirmation.
Regarding log4j2.properties params, this can be related if LS was upgraded from older version and miss paramters. In case there was no upgrade or nobody has been changed params, leave aside.
Again, according to the s.code on GitHub, an issue might be related to Java. Have you tried to set LS_JAVA_HOME?
Have you tried with .gz version? Just for test purpose. Extract, test, later can be removed.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.