I'm having an issue where if I try to run elastic-agent inspect with a policy that defines a condition with a function, I get an error, even if the function is valid.
Elastic Agent 8.11.3
Example:
Use the Kubernetes integration with the Container Logs enabled. Set the condition for that input to:
Error: expected ',' when parsing 'startsWith(${kubernetes.container.image}, 'docker.com') != true' accessing 'inputs.6'
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.11/fleet-troubleshooting.html
Anyone have any ideas?
Note: The Elastic Agent does seem to parse and use the conditions correctly.
HI @Priscilla_Parodi, yes, the config is valid. I ended up opening a support case for this issue. Support was able to reproduce and have escalated to the development team. I'm currently awaiting a response on the case regarding the dev team's finding.
Hi @stephenb your example is actually the same implementation as mine. The issue you'll run into is on that Elastic Agent which has that policy applied to it, try to run the command elastic-agent inspect, you will see that you get the error. The Elastic Agent is able to properly read/parse/use the condition and gather data as expected, however any sort of Elastic Agent CLI command inspect/uninstall/etc... all fail with the error.
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.