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

[Logstash Metrics] logstash.node.stats failing to index stats due to error in CEL expression. #9546

Closed
jvalente-salemstate opened this issue Apr 8, 2024 · 0 comments · Fixed by #9556

Comments

@jvalente-salemstate
Copy link

jvalente-salemstate commented Apr 8, 2024

I am using the Technical Preview data stream in the Logstash Metrics integration. None of the stats pulled by the API are being indexed to Elasticsearch. If I make the same call to the API using curl, I am getting the expected results.

Here's an example from my dashboard, same results regardless of how far back I search.

Screenshot of Kibana Dashboards displaying no events for logstash.node.stats

When I search data_stream.dataset: logstash.node every single event is including

error.message:failed eval: ERROR: <input>:33:4: no such overload: drop

This looks like it's originating at the end of packages/logstash/data_stream/node_cel/agent/stream/cel.yml.hbs

...

program: |
  get(state.url)
  .as(resp, bytes(resp.Body)
  .decode_json().as(body,
    {"logstash":{"node":{"stats":{
             "events":body.events,
             "jvm":{
                "uptime_in_millis":body.jvm.uptime_in_millis,
                "mem":body.jvm['mem'].drop("pools"),
                "threads":body.jvm.threads
              },
             "queue":body.queue,
             "reloads":body.reloads,
             "process":body.process,
             "os":{
              "cpu":body.process.cpu,
              "cgroup":has(body.os.group) ? body.os.cgroup : {},
             },
             "logstash":{
               "ephemeral_id":body.ephemeral_id,
               "host":body.host,
               "http_address":body.http_address,
               "name":body.name,
               "pipeline":body.pipeline,
               "pipelines":body.pipelines.map(pipeline, pipeline != '.monitoring-logstash', [pipeline]).flatten(),
               "snapshot":body.snapshot,
               "status":body.status,
               "uuid":body.id,
               "version":body.version,
              }
          }}
        }})
  )
  .as(eve, {
    "events":[eve]
  })

This looks like it's related to elastic/mito#55 but I'm not at all familiar with CEL and how its overloads work.

Environment I'm seeing this in:

  • Logstash v8.13.1
  • Elastic Agent v8.13.1
  • Logstash Integration v2.4.3
  • Ubuntu 20.04
robbavey added a commit to robbavey/integrations that referenced this issue Apr 9, 2024
An update to the cel-go library added stricter type checking, and made drop invalid.
This is a work-around to "hide" the type in an array, until a better fix is available.

Closes: elastic#9546,elastic#9319
robbavey added a commit that referenced this issue Apr 17, 2024
An update to the cel-go library added stricter type checking, and made drop invalid.
This is a work-around to "hide" the type in an array, until a better fix is available.

Closes: #9546,#9319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant