6 Replies Latest reply on Oct 11, 2011 10:50 PM by Lonnie Bowling

    Interface Monitoring Using PE's and Notifications

    Lonnie Bowling

      I am trying to monitor an interface to insure it is running OK.  There are two things that I am trying to get to work.


      I have set up two health tags for the interface: "Device Status" and "Heartbeat"


      In notifications I have set up a trigger that alarms if "Device Status" <> "Good".  This seems to work.


      The other thing I am trying to get setup is if the heartbeat become stale.  To do this I have created a PE tag that I will us in notifications, it looks like like this:


      prevval('heartbeat', '*') = 'heartbeat' 


      The PE is schedule to execute every 30 seconds.


      My PE is not working, it is always returning 1, so I must be missing something.  It seems like the previous value should never equal the current value.


      Any help would be appreciated.  Also if there are any suggestions on a better way to do this I'm open to ideas, I a novice when it comes to working with interface health points.









        • Re: Interface Monitoring Using PE's and Notifications



          Another way with HeartBeat tags is to check timestamp difference between the tag and *.


          Upd. And you can set up it as a trigger direct in PI Notifications, without the need in a PE tag. Just configure the Notification on a clock-based, set up a PE formula as a trigger and that should do the trick.



          • Re: Interface Monitoring Using PE's and Notifications
            Ahmad Fattahi

            Hi Lonnie,


            I believe what is happening here is that both sides of your comparison return the snapshot value. You would want to keep the right hand side as the snapshot but go back in the chain of events to get some older archive values to compare against. The nth most recent compressed value can be retrieved by nesting PrevEvent functions. For example:




            will return the second most recent compressed value. Hope this helps.

              • Re: Interface Monitoring Using PE's and Notifications
                Lonnie Bowling

                Thank Alex and Ahmad!


                So how do you work with the timestamp?  I looked at the PE functions and didn't see anything that would allow the operation that Alex mentions.

                  • Re: Interface Monitoring Using PE's and Notifications



                    The function ParseTime will allow you to get a timestamp from a time string like "*".


                    And PrevEvent that Ahmad included in his post is can return you the timestamp of the closest event before the timestamp you indicate as a parameter like:

                    PrevEvent('cdt158', '*')

                    This may not be what Alex was thinking of exactly, but his response I would guess it is an equation like:

                    IF ParseTime("*") - PrevEvent('cdt158', '*') < 2 THEN "NORMAL" ELSE "STALE"


                      • Re: Interface Monitoring Using PE's and Notifications

                        You can also use the PI Interface Status Utility and Use PI Notifications to monitor the interface status tag. This works very well.

                          • Re: Interface Monitoring Using PE's and Notifications
                            Lonnie Bowling

                            @Jon - Thanks for the suggestions, actually I am doing that in addition to monitoring the heartbeat.


                            So I have it all working, here is what I did:


                            Monitored the interface creating a notification trigger like this:


                            'Interface Status' <> "Good"


                            Monitored the heartbeat by setting up a notification like this:


                            Round((ParseTime("*") - PrevEvent("Heartbeat",'*')) > 60


                            Monitored ACE calculation by comparing the time stamp of a value used in the calculation with the time stamp of the output value:


                            Round(((PrevEvent('Meter_Reading','*') - PrevEvent('Usage','*'))/60))   >  'ACETimeOutSP'


                            Note that I used the round function, otherwise it would not work as a notification trigger.  I suspect it has to do with data typing and that round function forces it from a time value to a numeric value.


                            Thanks for everyone's input, vCampus Rocks!