Watcher

Hi
How can I solve this error?

I think my condition is incorrect:
"source": "if(ctx.payload._source.elasticsearch.cluster.stats.status == [yellow] || ctx.payload._source.elasticsearch.cluster.stats.nodes.count <= 4) {return true}",

Hi @Farid_N,

Should yellow be provided as a string? Can you try your script as either

"source": "if(ctx.payload._source.elasticsearch.cluster.stats.status == 'yellow' || ctx.payload._source.elasticsearch.cluster.stats.nodes.count <= 4) {return true}",

or

"source": "if(ctx.payload._source.elasticsearch.cluster.stats.status == ['yellow'] || ctx.payload._source.elasticsearch.cluster.stats.nodes.count <= 4) {return true}",

?

Yes, you`re right...
I fixed this issue
Thank you so much

1 Like