Create Alert Check with multiple conditions


is it possible to create an Alert in influx with multiple conditions? Either via the UI (configure a check) you can just select a single condition with a threshold. But I need multiple conditions with multiple thresholds like A < 15 OR B > 40. So just simple logical equations with and/or. Editing the script implementing such a logical equation seems also not working:

crit = (r) => (r["A"] < 30and r["B"] < 50) or (r["B"] < 20 and r["A"] < 10)

(And why do you find so less information for this very common and simple problem?)

Can someone help me? :slight_smile:

@Chris_paulte Short answer is yes, it is possible, but the Checks and Notifications UI is very limiting. I know this is beyond most people’s comfort levels, but you can write your own custom alerting task with all the conditions you want. I’m happy to help if you want to provide the relevant query details:

  • The base query that queries the alerting data.
  • The logic you want to determine the alert.
  • Do you want to tie into the existing InfluxDB checks and notification systems? It’s simpler if you don’t, but you will lose some visibility into some of the alert logging that InfluxDB provides.
  • Where do you want to send the alert?