Hello,
I'm trying to set a condition in my phpfpm pipeline that sends the log to a different index if field log.context.extra.asyncapi.name
exists but is not doing anything. It keeps sending the log to the phpfpm index instead of asyncapi-phpfpm.
This is the pipeline I'm using:
{
"description": "Basic ingest pipeline for phpfpm index",
"processors": [
{
"set":{
"field":"_index",
"value":"phpfpm"
}
},
{
"json": {
"if" : "ctx.containsKey('message') && ctx.message.startsWith('{')",
"field": "message",
"target_field": "log"
}
},
{
"set":{
"if": "ctx.containsKey('log.context.extra.asyncapi.name')",
"field":"_index",
"value":"asyncapi-phpfpm"
}
}
}
That field exists but is not redirecting the log to asyncapi-phpfpm
index for some reason.
Any help will be very appreciated. Thanks