# The filebeat default index cannot be changed

**URL:** https://discuss.elastic.co/t/the-filebeat-default-index-cannot-be-changed/140826
**Category:** Beats
**Tags:** filebeat
**Created:** [July 20, 2018, 3:11am UTC](https://discuss.elastic.co/t/the-filebeat-default-index-cannot-be-changed/140826 "2018-07-20T03:11:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kioo](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kioo](https://discuss.elastic.co/u/kioo)
#### Post date: [July 20, 2018, 3:11am UTC](https://discuss.elastic.co/t/the-filebeat-default-index-cannot-be-changed/140826/1 "2018-07-20T03:11:44Z")

</div>

This is my filebeat.yml configuration:

```auto
#=========================== Filebeat inputs =============================

filebeat.inputs:

- type: log

  # Change to true to enable this input configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /var/log/*.log
    #- c:\programdata\elasticsearch\logs\*

#============================= Filebeat modules ===============================

filebeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: false

  # Period on which files under path should be checked for changes
  #reload.period: 10s

#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 3
#setup.template.enabled: false
  #index.codec: best_compression
  #_source.enabled: false

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:

  # Kibana Host
  # Scheme and port can be left out and will be set to the default (http and 5601)
  # In case you specify and additional path, the scheme is required: http://localhost:5601/path
  # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
host: "123.20.12.236:5601"
# Configure what output to use when sending the data collected by the beat.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["11.159.11.12:9200"]
  output.elasticsearch.index: "test-%{[beat.version]}"
  setup.template.name: "test"
  setup.template.pattern: "test-"
  setup.dashboards.index: "test-"

```

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [July 20, 2018, 4:53am UTC](https://discuss.elastic.co/t/the-filebeat-default-index-cannot-be-changed/140826/2 "2018-07-20T04:53:11Z")

</div>

You made your `setup*` settings children of `output.elasticsearch`. Don't indent them under `output.elasticsearch`. For example see [Something is wrong with pipeline](https://discuss.elastic.co/t/something-is-wrong-with-pipeline/140766?u=andrewkroh).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 17, 2018, 4:53am UTC](https://discuss.elastic.co/t/the-filebeat-default-index-cannot-be-changed/140826/3 "2018-08-17T04:53:12Z")

</div>

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