"transform" : {
"script" : {
"source" : "def vars = ctx.vars ; ctx.vars.severity = ['Critical', 'Major', 'Minor'];if (BEA-310003) {ctx.vars.severity = Critical}",
"lang": "painless"
}
},
"actions": {
"log_error": {
"logging": {
"category": "watcher.logging.bppm.{{ctx.vars.Severity}}",
"level": "info",
"text": "Found {{ctx.payload.hits.total}} stuck thread in the logs (EAP)\n{{#ctx.payload.hits.hits}}[MINOR] {{_source.wlstimestamp}} {{_source.hostname}} {{_source.wlsdomain}} {{_source.wlsname}} {{_source.msgId}}\n{{/ctx.payload.hits.hits}}"
}
},
I have tried use conditional action, but it is still not working