Filebeat puts all logs in only one index

I have server with nginx running on. I'm trying to make filebeat installed on this server to send logs to elasticsearch directly. It sends logs, but however puts in "common" index filebeat-7.9.3-2020.11.04-000001

Here is filebeat config:

        path: ${path.config}/modules.d/*.yml
        reload.enabled: false
    - module: nginx
        enabled: true
        var.paths: ["/var/log/nginx/access.log*"]
        enabled: true
        var.paths: ["/var/log/nginx/error.log*"]
        enabled: false

      hosts: "my-ELK-server"
      index: "nginx-%{+yyyy.MM.dd}"
    setup.template.pattern: "nginx-*" "nginx"
      index.number_of_replicas: 0

Filebeat also created pipeling in ingest node, but still doesn't put this log in special index.
What should I configure to achieve this?

Since I have lack of experience in Elastic Stack, maybe I misunderstood - where should be definition of special index creation?

  1. In filebeat.yml config?
  2. In Ingest node pipeline?
  3. Do I need to create Index template for it?

Hey @yukpun welcome to discuss :slight_smile:

What you see is the default and recommended behaviour. Indexes are managed by ILM and they are rotated every month or every 50GB, whatever happens first. This configuration should be ok for most of the cases. In any case, it can be customized using the ILM API, or the Kibana management UI.

If for some reason, you need to change the index name, or you want to disable ILM and manage index configuration yourself, take a look to the ILM docs for filebeat:

THanks, this helped. I disabled ILM and now I have that indexes what I want.

1 Like

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