3 Replies Latest reply on Jul 31, 2017 10:10 AM by tomiannelli

    Is it possible to perform mathematical calculations in alerting/reporting conditions

    alexslv

      Hi Guys,

       

      I am just further exploring potential ways to get away from SQL scripting back to dynamic builder - just in hope to keep things a bit more clean. One thing that I often need to do is to perform various mathematical operations on the fly. I was just wondering if it is possible to achieve somehow without going SQL/SWQL route? Also, if you know of any advanced tricks with alerts/reports conditions - please give some references below

       

      Case study:

       

      * When node goes down, check number of polls it was down and only trigger if number of polls is more than certain defined threshold.

       

      I know we can have delays, but this will not work, simply because: first - it is based on minutes and I need polls (different nodes are being polled with different polling settings), and second - it is hard coded, whereas I want to have a custom property where I can define how many polls node is allowed to be down before triggering alert. Most of them by default will be 0 (custom property is blank) unless override has been set deliberately, per node, from UI (not hard coded)

       

      So, in essence I need to compare "LastSystemUpTimePollUtc" with "Next Poll" time and work out how many polls it was down, providing that we also know "Poll Interval". All these values are available in alerting engine already, and only basic math is required, however I was only able to achieve this with SQL so far.

       

      P.S.

      As a side feature request from above case - it would be cool to have database column value available in dynamic query builder for the number of polls since node has taken current state. However, this is just one case only - I have many similar small checks here and there...