11 Replies Latest reply on Oct 11, 2016 7:22 AM by i3scottw

    Alert trigger where the value is evaluated against a custom property?

    i3scottw

      Hello,

       

      I have been struggling to find an answer to this and am hoping someone might be able to help.   Within NPM I would like to create an alert that has a trigger evaluated against a custom property.   For example I have an alert built for a temperature sensor that looks something like this: "Custom Poller Current Stats - Current Value - is greater than - 80".  This works perfectly and triggers/resets the alert as appropriate when the temp gets higher/lower than 80.

       

      Instead of coding in a specific value for the alert trigger I would like to reference a custom property.   I have tried both of these formats without success:

      "Custom Poller Current Stats - Current Value - is greater than - ${TemperatureAlertWarningThreshold}"

      "Custom Poller Current Stats - Current Value - is greater than - ${N=SwisEntity;M=Node.CustomProperties.TemperatureAlertWarningThreshold}

       

      In either of the above two examples the alert immediately triggers as soon as I have saved it, regardless of what the current temp of the device is and what the custom property is set to.

       

      Any assistance or advice would be appreciated.   My goal is to be able to be able to specify a custom warning/critical threshold for each device, without having to build separate alert rules for each one.   I was hoping using custom properties would allow me to specify these values on a per device bases while using only a single alert rule.

       

      Thanks!
      Scott

        • Re: Alert trigger where the value is evaluated against a custom property?
          blsanner

          So, from the looks of it, the temperature reading is coming from a UnDP.  If so, are you limiting the alert to only apply to that particular poller?  Otherwise, if you have pollers for other things, if the numeric value exceeds the threshold CP, then it would trigger.  The second thing I would say to look at would be your custom property itself.  What format is it (text, integer, floating point number)?  I've seen issues when comparing values against a text field.  I always set my threshold custom properties to be floating point numbers just to be on the safe side.

            • Re: Alert trigger where the value is evaluated against a custom property?
              i3scottw

              Yes, the temperature reading is coming from a UnDP and the alert is only applying to that particular poller.    I had the custom property originally configured as an integer.   Based on your recommendation I have deleted the custom property and recreated it using a floating point number.    After recreating my alert it is still not functioning as I would expect - as soon as I put the variable name in for the trigger condition the alert immediately triggers, regardless of what the poller temperature currently shows or what value I have populated for the node in the custom property field I created.

               

              There are two fields I can choose from on the custom poller - one is "Current Value" and the other is "Current Numeric Value".     I have it set to "current Value", as it will not let me use a variable name for the trigger when using the "Current Numeric Value" due to the following error:  "Value is invalid. (Can't be empty or must be the same type as field)".    It will only allow me to put numeric data in the trigger field when set to this.

            • Re: Alert trigger where the value is evaluated against a custom property?
              d09h

              It can be helpful to make reports with the same logic as your alerts to help in refining/ validating.

              • Re: Alert trigger where the value is evaluated against a custom property?
                i3scottw

                I ended up opening a case with support to help answer this question.   Unfortunately it looks like it is not possible to use a Custom Property as an alert trigger.   Here were the comments the provided me on this support case:

                Variables like the one you are trying to use cannot be used in a trigger condition. They are valuated by what triggered the alert, thus cannot populate with data until the alert triggers.

                Trying to use it in a trigger condition would cause an infinite loop of failure. The alert wouldn't trigger because the variable is not populating. The variable is not populating because the alert won't trigger. As such, you won't be able to use it in the trigger condition. Variables are purely meant to be used in trigger actions.

                 

                That is a little disappointing, as it means I will have to create separate alerts for each trigger value I am interested in (instead of being able to do it with a single alert that has a trigger based on a custom property variable).