Filebeat Error and Configuration Issues

Despite my efforts, I have been unable to resolve the following error messages and configuration challenges. Your expertise and guidance would be greatly appreciated!
When checking the status of Filebeat, I encountered the following error:

ExecStart=/usr/share/filebeat/bin/filebeat --environment systemd $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS (code=exited, status=>
Main PID: 76406 (code=exited, status=1/FAILURE)

Upon running the command filebeat -v -e -d "*", I received the following error message:

"message":"Exiting: setup.template.name and setup.template.pattern have to be set if index name is modified","service.name":"filebeat","ecs.version":"1.6.0"}
Exiting: setup.template.name and setup.template.pattern have to be set if index name is modified

My Configuration YAML File:

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /var/log/jitsi/jicofo.log
  fields:
    log_type: jicofo
- type: log
  enabled: true
  paths:
    - /var/log/jitsi/jvb.log
  fields:
    log_type: jvb

filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

setup.template.settings:
  index.number_of_shards: 1

setup.kibana:

output.elasticsearch:
  hosts: ["abc.def.ghij.kl:9200"]
  index: "filebeat-%{[fields.log_type]}-%{+yyyy.MM.dd}"
  setup.template.name: "filebeat"
  setup.template.pattern: "filebeat"

processors:
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

Hi @Priyaansh_Dwivedi,

It looks like it's not picking up the setup.template.name and setup.template.pattern properties in your YAML configuration. Should those properties not be specified as top level config (i.e. not under output.elasticsearch)?

Thanks for your reply. Highly appreciated.
So where should the setup.template.name and setup.template.pattern be placed can you give more light to them?

So not indented under output as you have at the moment:


setup.template.name: "filebeat"
setup.template.pattern: "filebeat"
setup.template.settings:
  index.number_of_shards: 1

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