Hello,
I am using metricbeat 7.0.0 and sending data to the elasticsearch output. My elasticsearch version is also 7.0.0
I have a very basic configuration:
metricbeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: true
# Period on which files under path should be checked for changes
#reload.period: 10s
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
#_source.enabled: false
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["https://xxx:xxx"]
# Enabled ilm (beta) to use index lifecycle management instead daily indices.
#ilm.enabled: false
# Optional protocol and basic auth credentials.
#protocol: "https"
username: "xxx"
password: "${ES_PWD}"
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
When starting metricbeat, I get the following logs:
2019-04-30T15:19:49.163Z INFO elasticsearch/client.go:734 Attempting to connect to Elasticsearch version 7.0.0
2019-04-30T15:19:49.200Z INFO [index-management.ilm] ilm/std.go:134 do not generate ilm policy: exists=true, overwrite=false
2019-04-30T15:19:49.200Z INFO [index-management] idxmgmt/std.go:238 ILM policy successfully loaded.
2019-04-30T15:19:49.201Z INFO [index-management] idxmgmt/std.go:361 Set setup.template.name to '{metricbeat-7.0.0 {now/d}-000001}' as ILM is enabled.
2019-04-30T15:19:49.201Z INFO [index-management] idxmgmt/std.go:366 Set setup.template.pattern to 'metricbeat-7.0.0-*' as ILM is enabled.
2019-04-30T15:19:49.201Z INFO [index-management] idxmgmt/std.go:400 Set settings.index.lifecycle.rollover_alias in template to {metricbeat-7.0.0 {now/d}-000001} as ILM is enabled.
2019-04-30T15:19:49.201Z INFO [index-management] idxmgmt/std.go:404 Set settings.index.lifecycle.name in template to {metricbeat-7.0.0 map[policy:{"phases":{"hot":{"actions":{"rollover":{"max_age":"30d","max_size":"50gb"}}}}}]} as ILM is enabled.
2019-04-30T15:19:49.218Z INFO template/load.go:129 Template already exists and will not be overwritten.
2019-04-30T15:19:49.218Z INFO [index-management] idxmgmt/std.go:272 Loaded index template.
2019-04-30T15:19:57.610Z INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":98921,"time":{"ms":31}},"total":{"ticks":216561,"time":{"ms":203},"value":216561},"user":{"ticks":117640,"time":{"ms":172}}},"handles":{"open":417},"info":{"ephemeral_id":"6ce27a28-e6ef-412a-9dc1-b5675a608bf9","uptime":{"ms":5701111}},"memstats":{"gc_next":59560080,"memory_alloc":30130112,"memory_total":256062656,"rss":32768}},"libbeat":{"config":{"module":{"running":0},"reloads":3},"output":{"read":{"bytes":2459},"write":{"bytes":1514}},"pipeline":{"clients":3,"events":{"active":4119,"retry":8}}}}}}
2019-04-30T15:20:23.175Z ERROR pipeline/output.go:100 Failed to connect to backoff(elasticsearch(https://xxx:xxx)): Connection marked as failed because the onConnect callback failed: failed to create alias: {"error":"Incorrect HTTP method for uri [/<metricbeat-7.0.0-{now/d}-000001>] and method [PUT], allowed: [POST]","status":405}: 405 Method Not Allowed: {"error":"Incorrect HTTP method for uri [/<metricbeat-7.0.0-{now/d}-000001>] and method [PUT], allowed: [POST]","status":405}
2019-04-30T15:20:23.175Z INFO pipeline/output.go:93 Attempting to reconnect to backoff(elasticsearch(https://xxx:xxx)) with 131 reconnect attempt(s)
I run elasticsearch behind an nginx proxy. Could it be the problem ?
I can't see why the returned error is 405. The uri used for alias creation seems very strange /<metricbeat-7.0.0-{now/d}-000001> , I see them arriving to nginx with special characters encoded.