In this video I'll show you how
to configure notification rules
for the 2016 R2 release
and later. Keep in mind
that starting now, the notification rules are based off
of Event Frames and the Event Frames have to be
setup first. So if you haven't seen Event Frames
yet, if you aren't familiar with them, make sure to check
out videos on Event Frames. In this
example, I'll go ahead and setup
notification email alerts for when a
piece of equipment at our plant goes down.
So the first thing I'll want to do is open
up PI System Explorer just like how I have
here. And I'll need to be using
PI System Explorer 2016 R2 and
later. So I've got that and keep in
mind the specific actions that I'm going to be
doing require write permissions
in this AF Server. If you have questions about
what are the security permissions needed, make sure
to check out our documentation. So let's take a look
at this AF structure. I have
different sites and basically at
each site, there are different production
lines. And for a given production line,
there are several pieces of equipment that are part of that line.
So let's take a look at some of these equipment
pieces. I want to know
when the equipment goes down.
And as you can see here, there is actually a
status attribute that we have and this
indicates if the equipment is running. So I can see that this
particular piece of equipment is running now and that's
great. On the other hand,
let's look at something else that isn't necessarily running.
OK, like this
one, for example this piece of equipment is going through a
downtime and this is exactly the type of
situation that we want to create alerts for.
And we can even see that there is a fault code
that we are tracking to know the reason for the downtime.
So this is information that we have built into our
AF structure. And I mentioned
as a prerequisite, we have to have
Event Frames setup for this.
So why do we have to have Event Frames? Well
starting now, the notifications history is
stored in Event Frame annotations which is why we need
them first. Previously notifications
history was stored in PI Points. But moving
forward it's all about the Event Frames.
So let's confirm that I have Event Frames already setup.
I'm going to switch to library
and all the pieces of equipment that
we were looking at before are built
using our equipment template.
And if I look at the
specific analysis
template, you can see that I
have an Event Frame generation
analysis already setup for
monitoring my equipment downtime. Keep
in mind that you don't have to use Event Frames
that are created with the Event Frame generation
analysis. You could also use Event Frames that are
created with the PI Event Frame Generator
or manually or even with custom
AF SDK applications. The key thing is to make
sure that you have Event Frames setup. And
I also want to point out for this particular
Event Frame generation analysis what my trigger
condition is. So if you look at start trigger
here, you can see that the start of
an Event Frame is when the status does not
equal running. And
I've only got one start trigger specified.
Since I already have this
setup the next thing is to go ahead and
actually start configuring my notification. If
you worked with notifications before,
you might be used to looking for a notifications tab down
here which was the case for previous
versions. Now the path is to go to the
notification rules templates and to use
this to create notifications. So we
can create notification rules from
our equipment template if we want
to setup the notifications on a template basis.
If we wanted to create a notification for
just an individual element, we could go
ahead and do that. Let me point out that back under
elements, there is actually the
notification rules. So you would do it
on an individual basis here but I
want to set this up for all of my equipment
elements, so I'm going to go ahead and use the
template approach back here.
So if your Event Frames are not
setup using the Event Frame generation
analysis like I have, you'll want to go ahead
and navigate to the notification rule
templates if you are working on a template basis. Or
the notification rules on an element
basis. If you have Event Frame
generation analysis like I do, we are going to actually use this
button to create a new notification rule template
which will pre-populate some of the
notifications trigger for us.
OK, so you can
see that now we've moved over to the notification
rule templates. If you click on this
directly then you can have the option
to create a new notification rule template
and if you are doing it that way, you
will probably see that there is a big red exclamation mark next to
the trigger and that none of the information has been
filled out. You'll want to go ahead and configure the
trigger and in our case because we have the
Event Frame generation analysis, some of the information
is already prepopulated. But we'll
take a look at this by going to view and edit
trigger.
Now for the trigger, the key is that whatever
logic is generating the Event Frames
will serve as the trigger for the
notification. And that's broken down right here with this
sentence. The notification is
going to get triggered when
an Event Frame is created that matches the
criteria. And in our case it's for the selected
analysis because we have the Event Frame generation
analysis. So this filled
in, we've got the equipment template which we are
on and the equipment downtime that was the specific
analysis that we selected.
And here the trigger relationship
is again a one to one. If an Event Frame
gets created then a notification
will be also generated.
If you aren't using the Event Frame generation
analysis, you are going to change your criteria mode off of
analysis to the Event Frame search. And here
you are going to specify the criteria for
what are the Event Frames?
So again it's still the equipment reference element
template but maybe we can say, let's go
ahead and trigger the notification when an
Event Frame is created that uses say a
specific template like in this case our downtime
template. So in addition to doing the search
by template, you could also use name or
category here.
One thing that you might
see and have some questions about is
this attribute value down here at the
bottom. I'm actually again,
remember on the analysis,
so I also see that same option
here. What is this for? As I mentioned
right now there is a one to one relationship between if an
Event Frame is getting created to also trigger a
notification. But you can actually instead
trigger for only a subset of your Event
Frames based on specific attributes of
the Event Frames. Let's take a look at how we
can do this.
For this example, let's say I am part of the maintenance
team and I don't want to receive a
notification for any equipment
downtime, just the ones that are specifically due to
unplanned maintenance because those are the ones that I'm
directly responsible for
handling. I can go ahead and set the notification
up to use this as the trigger, so I'll change the
attribute value, I'll use that fault code
that we saw earlier. And I'll go ahead and do
the trigger for when the fault code equals
unplanned maintenance.
OK, so now only the Event Frames that
have downtimes due to unplanned
maintenance will result in the notification being
triggered. Additionally down here at the
bottom, there are some other
options. Check out the documentation for some specific
details. But just to quickly highlight some of them,
I'm going to be sticking with the defaults,
the resend interval is for if the notification
should be resent after a certain
time, if the Event Frame hasn't closed or been acknowledged
and the non repetition
interval would be for not
sending similar alerts within a set timeframe.
You can see here
there is also the option for the Event Frame can be
acknowledged. And if the Event Frame is
acknowledged, that would stop notification
escalations and resends. And we actually have a video
where we show acknowledging
Event Frames.
And this last option section is here
is specifically for Event Frame generation
analysis that uses multiple start triggers.
Remember earlier I only had one start trigger, so this
would not impact mine either.
So I'm keeping these at the defaults and I'll
go ahead and hit OK. And
now I have my trigger
completely specified. And one thing that I want to
do is I want to go ahead and actually
fill in a name and a meaningful description for this
notification, that way it will make it easy for us to keep
track of it. So
in this case, this notification is for
equipment downtime due to unplanned maintenance. So I'll
call it unplanned maintenance, equipment downtime.
And I'll go ahead and give it a
description and I'll go ahead and
assign it a category as well.
The next part of the
configuration is for subscriptions. We'll
need to specify who should receive the
notifications and what format
should the notifications be?
In our case, let's stick first
with view and edit subscriptions.
So this is where
we can drag contacts and add them
as subscribers to the notification rule.
In my case I can see that I am
listed here and I can go ahead
and select
to send the notification to my email just like that.
And once you have a particular
subscriber listed,
to notify the event start as well as the
end which I'm interested in, so I'll go ahead and select
that. And I could drag
more subscribers in and I could also
leverage escalation teams, groups,
other delivery endpoints. In my case
I'm just going to stick with adding my personal
email here but if you want to see more about how to
leverage these other options, check out our other
video. You'll also see that the
configuration has what format will be
used and right now it's the global default
email. So I'll go ahead and hit
OK and if I want to look at that
format, I can go to manage
formats
and here we see the global default
email and I can see what is going to be
contained in the notification for that
specific email format. Now in another
video, I'll show you how you can actually
go ahead and duplicate the format and
make changes to it or create a new specific
delivery format. For now I'm just going to
stick with this global default and hit OK.
So at this point I have everything
configured for my notification. So I'll go ahead
and check this
in.
And now if I look under an
individual element, I can see that we have
a notification rule
setup for that element. And if I wanted
to look at starting or stopping
all of the notifications at one
time, I could actually do this under the
management tab here.
So the management tab and then focusing on
the notification rules, I now
have options to do things in bulk like stopping or
starting these notification rules.
So right now they are all started and this is the
state that I want them to be in. So I'll go ahead
and leave that as is. And
actually I'm getting some email
notifications, so let me show you the
notifications that I'm receiving based on these rules that
we just setup.
So here is an example of a notification
that I just received. It looks
like we are having unplanned maintenance
for this specific piece of equipment.
So SeattleLine1L344.
Let's go ahead and confirm this.
So I'm going to switch back
and I look at
SeattleLine1L344.
And look at the attributes of this
equipment, I can see indeed it's a good thing that I received this notification
because we have a downtime due to unplanned maintenance.
So now I can go ahead and
respond right away.