Hi,
I'm using Filebeat, Logstash, Elasticsearch and Kibana all together to log data from an app.
For all these I use versions 7.2.0.
My problem is : I can't assign automatically an ilm policy to the indexes created by logstash.
For the pipeline here are the confs :
elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
discovery.zen.minimum_master_nodes: 1
discovery.type: single-node
logstash.yml
http.host: "0.0.0.0"
path.config: /usr/share/logstash/pipeline
logstash.conf
input {
beats {
port => 5044
}
}
filter{
grok {
match => { "message" => "%{LOGLEVEL:level} %{SPACE} %{TIMESTAMP_ISO8601:date} \[(?<thread>[^\]]+)\] %{JAVACLASS:class} - %{GREEDYDATA:msg}" }
}
}
output {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "%{[@metadata][beat]}-%{[fields][origin]}-%{+YYYY.MM.DD}"
template_name => "logstash"
ilm_policy => "log_policy"
ilm_enabled => true
}
}
kibana.yml
server.name: kibana
server.host: "0"
elasticsearch.hosts: http://elasticsearch:9200
xpack.ilm.enabled: true
filebeat.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/application/applog.log
fields:
origin: app
output.logstash:
hosts: ["logstash:5044"]
I have created the log_policy in Kibana. And assigned it to the logstash template.
In /_template/logstash I can see
"settings": {
"index": {
"lifecycle": {
"name": "log_policy"
},
"number_of_shards": "1",
"refresh_interval": "5s"
}
},
I checked _ilm/status, it returns
{
"operation_mode": "RUNNING"
}
but /_ilm/explain returns
"filebeat-app-2019.07.186": {
"index": "filebeat-app-2019.07.186",
"managed": false
},
How can I change this managed property to true for all new indexes created by logstash ?