Hey,
I'm creating an ingest pipeline for the Elastic Observability Engineer lab with the following condition:
ctx.mysql.status.max_used_connections >= 10
This is the suggestion from the solution and is working fine.
The video lesson on the other hand suggest another approach via ctx['my-field']
. I assume the condition should be as following
ctx['mysql.status.max_used_connections'] >= 10
This is not working for me. Can anyone explain why? What am I getting wrong? The Painless Script documentation (Script processor | Elasticsearch Guide [8.2] | Elastic) is stating both as alternatives.
To access these fields with a Painless script, use the map access operator:
ctx['my-field']
. You can also use the shorthandctx.<my-field>
syntax.