Configuration using filebeat with static index name


I would like to know how I need to configure filebeat to use an existing index(it's empty). What's the configuration to do so? So far I tried in a helm chart:

      hosts: ''
      index: 'my-index-filebeat'
      username: "XXXXX"
      password: "YYYYY"
      name: 'my-index-filebeat'
      overwrite: true
      enabled: true
      pattern: 'my-index-filebeat'

I cannot create index in this elasticsearch server, only use this one.

Thanks in advance

It sounds like you are running into this issue:

The workaround is to set setup.ilm.enabled: false in your Filebeat configuration. Could you try that and see if the my-index-filebeat template and my-index-filebeat index get created?



Thanks Shanuak,

I tried with that option but unfortunately it doesn't work.

My case it's a little bit uncommon. I need to use the my-index-filebeat index that was created by the elasticsearch admins in my company. I cannot create any index in the elasticsearch server.
What should I do to make it work?


2019-10-17T13:56:00.894Z INFO pipeline/output.go:93 Attempting to reconnect to backoff(elasticsearch( with 4 reconnect attempt(s)
2019-10-17T13:56:00.894Z INFO [publisher] pipeline/retry.go:189 retryer: send unwait-signal to consumer
2019-10-17T13:56:00.894Z INFO [publisher] pipeline/retry.go:191 done
2019-10-17T13:56:00.894Z INFO [publisher] pipeline/retry.go:166 retryer: send wait signal to consumer
2019-10-17T13:56:00.894Z INFO [publisher] pipeline/retry.go:168 done
2019-10-17T13:56:00.903Z INFO elasticsearch/client.go:743 Attempting to connect to Elasticsearch version 6.8.2
2019-10-17T13:56:00.914Z INFO template/load.go:169 Existing template will be overwritten, as overwrite is enabled.
2019-10-17T13:56:00.984Z INFO template/load.go:108 Try loading template my-index-filebeat to Elasticsearch

Indexing into an existing index should be fine; I just tested it to make sure.

As a test, could you try to send a Bulk API request, using the same username+password as in your Filebeat configuration, to my-index-filebeat from the command line (using curl or equivalent) on the host where Filebeat is running?

That'll tell us if a) a connection can be made from the Filebeat host to the Elasticsearch cluster and b) if the configured user has sufficient privileges to bulk index documents into my-index-filebeat.

Also, are those all the logs you are seeing for Filebeat? Specifically, are there any log messages showing errors or warnings?

Finally, which version of Filebeat are you using?


As requested:

$ cat requests
{ "index" : { "_index" : "test", "_id" : "1" } }
{ "field1" : "value1" }

curl -s -H "Content-Type: application/x-ndjson" -XPOST --data-binary "@requests" -u XXXXXX; echo
Enter host password for user 'XXXXXX':
{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: type is missing;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: type is missing;"},"status":400}

  • Example Connection:

$ curl -XGET "" -u XXXXXX
Enter host password for user 'XXXXXX':
"took" : 5,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
"hits" : {
"total" : 0,
"max_score" : null,
"hits" :

  • I will double check the permissions with our team.

  • Only I have these INFO messages, get stuck in Try loading template ....

  • Filebeat version: 7.3.2

Many Thanks.

Can you try changing this line in requests to:

{ "index" : { "_index" : "test", "_type": "_doc", "_id" : "1" } }

and make the curl request again please?

{"took":9,"errors":true,"items":[{"index":{"_index":"test","_type":"_doc","_id":"1","status":403,"error":{"type":"security_exception","reason":"action [indices:admin/create] is unauthorized for user [XXXXX]"}}}]}

Just a reminder, I cannot create index only using the existing one.


So is test not an existing index? Can you try the bulk request from curl using the same existing index that you would use in your output.elasticsearch.index setting?

Sorry, I didn't changed the name of the index, this is the result with my index:


#hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}'
hosts: ''
index: 'my-index-filebeat'
username: "XXXXXX"
password: "YYYYYY"
name: 'my-index-filebeat'
overwrite: true
enabled: false
pattern: 'my-index-filebeat*'
setup.ilm.enabled: false

It seems that enabled: false did the trick.

Thanks for your support

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