Filebeat Module Custom Index

I currently have application logs going in to an index through Filebeat, but would like to use the NGINX module to send access and error logs to a seperate instance through the same Filebeat.

I can see how to set the log type for custom logs but cannot work out how to do this for a module.

(Filebeat 7 straight to Elasticsearch)

Thanks

filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: true
setup.kibana:
  host: "192.168.47.175:5601"
output.elasticsearch:
  hosts: ["localhost:9200"]
  indices:
    - index: "nginx_access-%{[beat.version]}-%{+yyyy.MM.dd}"
      when.contains:
        fileset.name: "access"
    - index: "nginx_error-%{[beat.version]}-%{+yyyy.MM.dd}"
      when.contains:
        fileset.name: "error"
setup.template.name: "nginx"
setup.template.pattern: "nginx_*"
setup.template.enabled: false
setup.template.overwrite: true
1 Like

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