Hi Team,
I am sending data to elasticsearch using filebeat once the file were harvested I can see field
host.name
where the value is hostname of the VM
{
"_index": "filebeat-7.17.6-2023.03.13-000001",
"_type": "_doc",
"_id": "wGdI24YBQ3WX0oT6tKyJ",
"_score": 1.0,
"_source": {
"@timestamp": "2023-03-13T14:03:38.455Z",
"agent": {
"name": "logstash",
"type": "filebeat",
"version": "7.17.6",
"hostname": "logstash",
"ephemeral_id": "6f61b3c8-4867-470a-834b-6389c7e848d9",
"id": "e4e34578-5252-4493-ab90-380affaa6a3f"
},
"log": {
"offset": 514,
"file": {
"path": "/home/ganeshbabu_lab/filebeat-7.17.6-linux-x86_64/seven.log"
}
},
"message": "testing the filebeat",
"input": {
"type": "filestream"
},
"fields": {
"host": "filebeat-test",
"level": "debug",
"review": 1
},
"ecs": {
"version": "1.12.0"
},
"host": {
"name": "logstash"
}
}
}
By default host.name
field is coming in every events processed through filebeat.
How to avoid host.name
in json by default?
Using drop fields i can able to remove the host.name
. Is there any option in filebeat not to send host.name
Please let me know your thoughts.
Thanks,
Ganeshbabu R