The configure option add_metadata_from_env is not working.
input {
stdin { }
}
filter {
environment {
add_metadata_from_env => {
"home1" => "HOME"
}
add_field => {
"home2" => "${HOME}"
}
}
}
output {
stdout {
codec => rubydebug
}
}
Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties
The stdin plugin is now waiting for input:
09:05:20.762 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
09:05:20.770 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
09:05:20.845 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
aaaa
{
"@timestamp" => 2017-02-14T09:05:24.998Z,
"@version" => "1",
"host" => "696a6caef712",
"message" => "aaaa",
"tags" => [],
"home2" => "/root"
}
The configure option add_metadata_from_env is not working.
System info is here: