Hi,
I am trying to learn ow to use ecs schema within logstash. I use logstash 7.10.0 and input plugin I want to use in my logstash config file is "exec input". I am trying to just follow the documentation guideline https://www.elastic.co/guide/en/logstash/7.17/plugins-inputs-exec.html#plugins-inputs-exec-ecs_compatibility for this plugin to learn how to use ecs with it.
I have a config file called exec.conf with the following content:
input {
exec {
command => "echo 'hi--!!!'"
interval => 10
ecs_compatibility => v8
}
}
output {
stdout{}
}
Regardless of whether I put the line "ecs_compatibility => v8" in my config file or don't, the output I see is:
{
"@version" => "1",
"@timestamp" => 2022-09-05T21:48:16.291Z,
"message" => "hi--!!!\n",
"host" => "seroiuts02525",
"command" => "echo 'hi--!!!'"
}
While according to the documentation I should see different outputs when I have ecs_compatibility enabled and disabled (I think at least I should see the host name like this:
"host" => {
"name" => "seroiuts02525"
},
when the ecs_Compatibility => v8 exists in my config file but that is not the case!
I have also tried to enable the ecs_compatibility in my config/pipeline.yaml file and here is the content of this yaml file regarding this pipeline:
- pipeline.id: exec-pipeline
path.config: /repo/emarykh/logstash/logstash-7.10.0/logstash config/config/pipelines/exec.conf
pipeline.ecs_compatibility: v8
This also does not work and my output remains the same.
Could someone please help me understand what part I am missing in my configuration?
Thanks,
Maryam