Alert handle based on multiple fields in kapacitor

57 Views Asked by At

I want to create alert in Kapacitor. I used http input plugin in telegraf to fetch data from endpoint after each 10 seconds. So telegraf fetched following data for each request:

{[{"id": "id1", "threshold": 100}, {"id": "id2", "threshold": 190}, {"id": "id3", "threshold": 110}, {"id": "id4", "threshold": 240}]}


Here threshold can be any value between 0 to 300.

So I want to create two alerts lower_threshold and upper_threshold. lower_threshold = threshold < 50 upper_threshhold= threshold > 250

But what happens is that if we set these two alerts then some time more than one alerts gets triggered because of multiple thresholds available in same data. But I want to trigger only once. That is if any of thresholds (out of 4) comes below 50 then trigger lower_threshold alert. At the same time if other threshold also comes below 50 then don't do anything. And similar for upper_threshold.

Anyone have any idea?

0

There are 0 best solutions below