General Search Not working on Field

I'm using FunctionBeat to export ECS logs to Elastic Cloud. Here is my configuration: "gatsby-deploy"
  - name: ProdServiceLogs
    enabled: true
    type: cloudwatch_logs
    description: "Lambda function for transferring 'prod' logs from Cloudwatch '/services/container/prod' to ELK stack index (prod-services)."
      - log_group_name: /services/container/prod "XXXX"
cloud.auth: "XXXX"
output.elasticsearch.index: "prod-services-%{+yyyy.MM.dd}" "prod-services"
setup.template.pattern: "prod-services-*"
setup.ilm.rollover_alias: "prod-services"

  - if:
        message: "^{"
      - decode_json_fields:
          fields: ["message"]
          process_array: false
          max_depth: 3
          target: ""
          overwrite_keys: true
      - rename:
            - from: "service"
              to: ""

We as part of the Json log entry we have a field user.username which has the customers email. It gets populated correctly, but if I do a search "" it doesn't show up. But if I do user.username: "", it shows up correctly.

We have another service that uses Logstash, that also processes the similar logs, and creates two fields user.username and user.username.keyword. The general search works correctly here.

I noticed that the FunctionBeat makes user.username aggregatable, but user.username in Logstash version is not, just the user.username.keyword is.

How can I make FunctionBeat work like Logstash so I get two fields and user.username is searchable with general search?

What does your index template look like for prod-services-*?

So, I didn't setup anything special in the templates. I just deployed FunctionBeat with the configuration above and it created the everything on ElasticSearch. I then created the Index Pattern for Kibana, but that is it. That said, here is a link to what I think is the template.

Elastic Search Template

Hmm, that link doesn't work for me.

If you post your index mappings/settings we can create a set of Console commands to try to reproduce the issue and see where the behaviors diverge.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.