Learning How to Create Behavior Models
-
How to Use Polls - How to Create a Poll - Creating a New Poll -
This first activity will step you through the first stage of the process of creating a poll that checks for high traffic.
From the
Admin
menu, choose Poll List
.
NerveCenter displays the Poll List window.
The Poll List window contains summary information about all poll definitions in the NerveCenter database for the active server. From this window you can open existing poll definitions or create new ones.
New
.NerveCenter displays the Poll Definition window.
Name
field, type the name for your new poll definition, 1CheckTraffic
.
Property
list select myNodes
.In the last chapter you assigned a particular set of nodes to the CriticalDevices property group. Since myNodes is unique to the CriticalDevices property group, when you select it you are telling NerveCenter to monitor only that particular set of nodes.
Port
blank.
By leaving the Port
text field blank you are telling this poll to communicate with each node on
the port specified in the node's definition. (This would have been done by your network
administrator.)
Poll Rate
area, type 30
in the field and select the Seconds
button.You are now ready to define the core of your poll, the poll condition. The next activity will step you through that process.
The core of each poll is its poll condition. A poll condition is a Perl script describing the conditions the poll should monitor. The poll condition also defines what trigger to fire when the poll detects those conditions.
This next activity will step you through the process of writing a poll condition for the 1CheckTraffic poll.
Poll Condition
tab.NerveCenter displays the Poll Condition page.
Base Object
drop-down list, select ifEntry
.Selecting this Management Information Base (MIB) base object tells the poll condition to reference only the ifEntry object.
Attribute
list, double-click the attribute ifInOctets
.
ifEntry.ifInOctets appears in the Poll Condition
text field.
Poll Condition
text field, position the cursor before ifEntry.ifInOctets. Then type if( so that the expression states this:
if( ifEntry.ifInOctets
Other functions
, then delta
.The word delta and a left parenthesis appears in the expression.
The delta in this expression will return the difference between the values of ifEntry.ifInOctets taken over two consecutive polling instances.
if( delta( ifEntry.ifInOctets) >= 5)
{
}
To ensure that this poll will find a high-traffic condition, a low number for ifInOctets (five) is being used. In a real poll, you will want to define poll conditions based on the performance statistics for your network.
Other functions
, then FireTrigger
.The word FireTrigger and a left parenthesis appears in the expression.
This tells the poll to fire the trigger portTraffic if it detects a difference between the values of ifEntry.ifInOctets of two successive polls to be at least five.
The entire expression should looks like this:
if(delta( ifEntry.ifInOctets)>=5)
{
FireTrigger( "portTraffic");
}
Save
.You have now completed writing your poll condition. Before 1CheckTraffic can begin polling, you must complete a few more steps as explained in Enabling a Poll .
You have just completed creating the 1CheckTraffic poll, which will poll all the nodes in the CriticalDevices property group for the number of ifEntry.ifInOctets. When the poll detects high-traffic conditions (what we've defined as a difference of five), it will fire the trigger portTraffic.
For this poll to begin actively polling, it must be enabled. This activity steps you through that process.
Poll
tab.NerveCenter displays the Poll page.
Notice that the poll condition you just entered now appears in the poll condition window on the Poll page.
Enabled
frame, select On
.Notice that once the poll is enabled, all active fields and buttons are grayed out. A poll must be disabled to be modified.
Save
.You have just enabled the poll 1CheckTraffic. However, because of a NerveCenter feature called smart polling, this poll will not work until you create an alarm that is instantiated by its trigger. You will learn how to create this alarm in the next chapter, How to Use Alarms on page 35.
Before you create an alarm associated with the 1CheckTraffic poll, you should modify the poll condition to improve the poll. This will give you a chance to see an additional feature of the poll list.
From the
Admin
menu, choose Poll List
.
NerveCenter displays the Poll List window.
Notice that the 1CheckTraffic poll is listed as being enabled. You will need to turn it off before we can modify it.
1CheckTraffic
poll.Notice that the pop-up menu gives you several ways to alter the poll without entering the Poll Definition window.
Off
.You could also have turned off the poll from within the Poll Definition window.
Open
.
Poll Condition
tab.
Poll Condition
field so that it looks like this:
if((delta( ifEntry.ifInOctets )>=5) and
(delta( ifEntry.ifOutOctets )>=5))
{
FireTrigger( "portTraffic" );
}
The modified poll will now check for an increase of incoming traffic, as well as outgoing.
Poll
tab.
Enabled
frame, select On
.
Save
.Now you have created, modified, and enabled the 1CheckTraffic poll. In Chapter 4, How to Use Alarms you will create an alarm that will transition states when your new poll generates the portTraffic trigger.
How to Create a Poll | Review and Summary |
29 July 2003 |