I am exporting the metricbeat index from elastic using logstash.
I would like to exclude the service.type
term docker
from the output. I am using the following query:
query => '{
"query": {
"bool": {
"should":[{"term":{"service.type":"kubernetes"}},{"term":{"service.type":"prometheus"}},{"term":{"service.type":"system"}}],
"filter": [{"range": { "@timestamp": {"gte": "now-15m","lte": "now","format": "strict_date_optional_time||epoch_millis"}}}]
}
}
}'
So, the query above I am just including the service types that I want to see in the output index. However, in the resulting json output file, I am still seeing the service type docker.
"max_score" : 0.8040674,
"hits" : [
{
"_index" : "metricbeat-7.17.7-2023.04.04-000007",
"_type" : "_doc",
"_id" : "t4NRUIcBtJJ8K_62Ehkk",
"_score" : 0.8040674,
"_source" : {
"@version" : "1",
"service" : {
"address" : "unix:///var/run/docker.sock",
"type" : "docker"
},