question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filebeat not creating specified index

See original GitHub issue

Chart version: 7.6.1

Kubernetes version: 1.4

Kubernetes provider: EKS

So I am trying to set up filebeat to use an index different to filebeat, below is my config map:

filebeat.inputs:
- type: docker
  containers.ids:
  - '*'
  processors:
  - add_kubernetes_metadata:
      in_cluster: true
  - add_cloud_metadata:

  fields:
    source: eu-west-1
    log_type: kubernetes
    environment_type: production
    environment: eu-west-1
  tags: ['kubernetes']

output.elasticsearch:
  index: "kubernetes"
  hosts: "https://xeu-west-1.aws.found.io:9243/"
  username: "elastic"
  password: "x"

setup.template.name: "kubernetes"
setup.template.pattern: "kubernetes-*"
setup.template.settings:
  setup.ilm.enabled: true
  setup.ilm.rollover_alias: "kubernetes"
  setup.ilm.pattern: "{now/d}-000001"
  setup.ilm.policy_name: "Standard-Index"

however, when the pod starts it appears to treat ILM as if it’s set to auto.

2020-03-23T09:50:59.310Z	INFO	[index-management]	idxmgmt/std.go:258	Auto ILM enable success.
2020-03-23T09:50:59.315Z	INFO	[index-management.ilm]	ilm/std.go:139	do not generate ilm policy: exists=true, overwrite=false
2020-03-23T09:50:59.315Z	INFO	[index-management]	idxmgmt/std.go:271	ILM policy successfully loaded.
2020-03-23T09:50:59.315Z	INFO	[index-management]	idxmgmt/std.go:410	Set setup.template.name to '{filebeat-7.6.1 {now/d}-000001}' as ILM is enabled.
2020-03-23T09:50:59.315Z	INFO	[index-management]	idxmgmt/std.go:415	Set setup.template.pattern to 'filebeat-7.6.1-*' as ILM is enabled.

I am using image and chart version 7.6.1 there are zero errors or warnings on fiilebeat startup.

It’s definitely reading the config as the logs are reaching our ES cluster in the filebeat index. How do I change this index?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fatmcgavcommented, Mar 23, 2020

You are 100% correct, my apologies

No worries. Glad I could get you working…

2reactions
fatmcgavcommented, Mar 23, 2020

@runtman it looks like the setup.ilm.* keys are still nested under the setup.template.settongs: key.

They shouldn’t be…

So the config should look like:

setup.template.name: "kubernetes"
setup.template.pattern: "kubernetes-*"
setup.ilm.enabled: true
setup.ilm.rollover_alias: "kubernetes"
setup.ilm.pattern: "{now/d}-000001"
setup.ilm.policy_name: "Standard-Index"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Filebeat index not created - Elasticsearch - Elastic Discuss
Hi Guys, I spent hours trying to get filebeat to index a custom log file but I am not having any luck in...
Read more >
Filebeat is not creating index in Elasticsearch - Stack Overflow
Elasticsearch is running in a Docker container in localhost at 9200. When I run filebeat (Docker), no index is created in Elasticsearch. So,...
Read more >
Custom index in filebeat : r/elasticsearch - Reddit
Hi everyone, Anyone knows how to make custom index in elatsticsearch.output In my case whether the setup.ilm is enabled or not , the...
Read more >
Understanding Elasticsearch index templates and how to view ...
Elasticsearch applies templates to new indices based on an index pattern that matches the index name. Index templates are only applied during index...
Read more >
Driving Filebeat data into separate indices (uses legacy index ...
Each destination “index” that we will specify in Filebeat will actually ... not exist, then filebeat will create an index with the specified...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found