Ok i did not configured the fields to add module atrribute and system value, and i dont want do it this way because the field will be also on kafka logs,
From what i saw, there is no way to add specific fields or tags directly in the filebeat module config,
Is there others inputs than using tags or fields to do conditionnals filter on logstash output ?
Here is an example rubydebug output i have:
{
"agent" => {
"hostname" => "PIXID-KAFKA3",
"id" => "4f0c403b-c4af-41a3-8ba6-47d9a929066f",
"ephemeral_id" => "107507ec-94fe-4f94-86e1-569843901b69",
"type" => "filebeat",
"version" => "7.7.1"
},
"log" => {
"file" => {
"path" => "/var/log/messages"
},
"offset" => 11986996
},
"@metadata" => {
"version" => "7.7.1",
"beat" => "filebeat",
"ip_address" => "10.10.9.153",
"type" => "_doc",
"pipeline" => "filebeat-7.7.1-system-syslog-pipeline"
},
"fileset" => {
"name" => "syslog"
},
"message" => "Jun 17 15:38:54 pixid-kafka3 filebeat: ],",
"tags" => [
[0]
"kafka", [1]
"beats_input_codec_plain_applied"
],
"input" => {
"type" => "log"
},
"@timestamp" => 2020 - 06 - 17 T15: 38: 55.469 Z,
"ecs" => {
"version" => "1.5.0"
},
"service" => {
"type" => "system"
},
"host" => {
"hostname" => "PIXID-KAFKA3",
"os" => {
"kernel" => "3.10.0-957.27.2.el7.x86_64",
"codename" => "Core",
"name" => "CentOS Linux",
"family" => "redhat",
"version" => "7 (Core)",
"platform" => "centos"
},
"containerized" => false,
"ip" => [
[0]
"10.10.9.153"
],
"name" => "PIXID-KAFKA3",
"id" => "709befdd51334c5bacdcf096a8afd4ee",
"mac" => [
[0]
"00:50:56:b3:2f:cc"
],
"architecture" => "x86_64"
},
"@version" => "1",
"fields" => {
"env" => "rct1"
},
"event" => {
"timezone" => "+00:00",
"module" => "system",
"dataset" => "system.syslog"
}
}