I notice that Elastic Agent does not populate the ecs filed organization.name and for this, following the documentation I try to create a pipiline as this:
POST /_ingest/pipeline/_simulate
{
"pipeline" :
{
"processors": [
{
"set": {
"if":"ctx.data_stream?.namespace == 'test01'",
"field": "organization.name" ,
"value": "TEST01",
"override": true,
"ignore_failure": true
}
},
{
"set": {
"if":"ctx.data_stream?.namespace == 'test02'",
"field": "organization.name",
"value": "TEST02",
"override": true,
"ignore_failure": true
}
}
]
},
"docs": [
{
"_index": "index",
"_id": "id",
"_source": {
"data_stream":
{"namespace": "test01"
},
"organization.name": "no-one"
}
}
]
}
and thi is the result:
{
"docs": [
{
"doc": {
"_index": "index",
"_version": "-3",
"_id": "id",
"_source": {
"organization.name": "no-one",
"data_stream": {
"namespace": "test01"
},
"organization": {
"name": "TEST01"
}
},
"_ingest": {
"timestamp": "2023-12-29T20:05:03.990779828Z"
}
}
}
]
}
I have two value :
"organization.name": "no-one"
and
"organization": {
"name": "TEST01"
}
I expected only one value "organization.name". How can I st, in the correct way, the value of "organization.name"