# Elasticsearch with http_timeout and authentication
[[inputs.elasticsearch]]
  servers = ["http://user:password@localhost:9200"]
  local = true
  cluster_health = true
  cluster_stats = true
  cluster_stats_only_from_master = true
  enrich_stats = false
  http_timeout = "30s"
  indices_include = ["application-*", "system-*"]
  indices_level = "shards"
  username = "elastic"
  password = "changeme"

  [inputs.elasticsearch.headers]
    "X-Custom-Header" = "telegraf"