Learning How to Create Behavior Models
-
How to Use Trap Masks - How to Create a Trap Mask -
In this next scenario, you want to know if any of the nodes in the CriticalDevices group are communicating without proper authorization. You will create a trap mask to "mask out" or filter out any SNMP trap that warns of an authentication failure. Since the mask will be useless without an associated alarm, you will create an alarm as well.
The scenario includes four activities:
This first activity will step you through the process of creating a new trap mask that will listen for an SNMP trap signaling an authentication failure.
Admin
menu, choose Mask List
.
NerveCenter displays the Mask List window.
The Mask List window contains a list of the trap masks in the NerveCenter database for the active server.
New
.The Mask Definition window appears.
The Mask Definition window allows you to examine, create, or change a trap mask definition.
Name
field, type 1CheckAuth
.
Generic
list, select the generic trap number AuthFail = 4
.You are telling the mask only to respond to an agent sending a generic SNMP trap 4. An agent sends a trap 4 when it receives an SNMP message with a bad community string.
From
and From Only
buttons. Also skip the Enterprise
and Specific
fields. These fields will be explained later.
Trigger Type
field, select Simple Trigger
.
The Simple Trigger
field is enabled.
You would use the Trigger Function option only if you need to conditionally fire a trigger based on the contents of the trap's variable bindings. For this activity, a simple trigger will do.
Simple Trigger
field, type authFailTrig
.
Enabled
frame, select On
.
Save
, then Cancel
to close.The mask will now be listening for AuthFail traps. However, as we saw, with the 1CheckTraffic poll, the trap mask is useless until we have an alarm associated with it. In the next activity you will create an alarm for the mask.
In the last activity, you created a mask called 1CheckAuth to detect for SNMP AuthFail traps. You now need an alarm that will be triggered when the trap is detected.
This next activity steps you through the process of creating an alarm that will alert you when an authentication failure is detected.
To create an alarm to be triggered by a mask:
Admin
menu, choose Alarm Definition List
.
NerveCenter displays the Alarm Definition window.
New
.The Alarm Definition window appears.
Name
field, type 1FailedAuth
.
Property
field to myNodes and the Scope
field to Node.
In the alarm's state diagram, add a state with a severity of Major and the name Trap4Received.
Create a transition from the Ground state to the Trap4Received state that is triggered by authFailTrig.
New Action
.A list of action alarms appears.
Log to File
.NerveCenter displays the Log to File Action window.
File Name
field, type myLog
.
Default Data
checked.
On
in the Enable
and Verbose Output
fields.
OK
.
The Log to File Action window closes. The Log to File action is included in the Actions
list.
The Log to File alarm action writes information about an alarm transition to an ASCII text file. Since you entered a file name, the log file will be written to the directory installation_directory/Log (Windows) or installation_directory/userfiles/logs (UNIX). If you enter a full pathname, the log file is written to the directory you specified.
OK
.The authFailTrig transition now appears in the state diagram. Size and position the icons as needed.
On.
Save
.You have just completed creating an alarm that will respond to the 1CheckAuth mask. The only step left is to have a trap for the mask to detect. The next activity will step you through one way you can use NerveCenter to generate a trap.
In the last activity, you created the 1FailedAuth alarm to respond to the 1CheckAuth mask. Previously, you created the 1CheckAuth mask to listen for a generic 4 trap. Since SNMP traps are unsolicited and sent in response to specific conditions on your network, it may be some time until one of your managed nodes sends this particular trap.
This next activity will step you through the process of artificially creating a generic 4 trap using the NerveCenter utility trapgen.
To use trapgen to generate a trap:
trapgen
server_name ""
a_node_name 4 0 ""
You are commanding your platform to generate a trap with the following specifications:
""
for enterprise sends the trap with a default value.
""
for time_stamp sends the trap with a default value.
Admin
menu, choose Alarm Summary
.NerveCenter displays the Alarm Summary window. The instance for the alarm 1FailedAuth should appear in the Alarm Summary list.
myLog as it Appears in Notepad
In the last activity, you specified that when the alarm 1FailedAuth transitioned from the Ground state to the Trap4Received state that it would perform the Log to File action. The myLog file represents the results of that action.
You have just created a behavior model that will log to a file any instance of an authentication failure on any of the nodes in the CriticalDevices property group. To do this you created a mask that would detect SNMP generic 4 traps.
In the next activity you will modify this mask to enhance its filtering process, using the trigger function of the mask.
In the previous activities you created a mask that would alert you when the agent of a node in your CriticalDevices property group sent an SNMP generic 4 trap. But suppose one of the devices in this group generates frequent authorization failures; the constant string of authorization traps may become annoying.
In this next activity you will use the trigger function of a mask to filter out all failed authorization traps for a particular node.
Admin
menu, choose Mask List
.
NerveCenter displays the Mask List window.
1CheckAuth
mask, and select Open
.The Mask Definition window for 1CheckAuth appears. If 1CheckAuth is still enabled, all the fields will be grayed out.
Off
.
Trigger Function
.
Trigger Function
tab.The Trigger Function page appears.
if ($NodeName ne "
your_node_name") {
Be sure to substitute the full name of one of your own managed nodes for your_node_name in the first line of the function.
This trigger function tests the name of the node that caused the trap and fires the trigger only if the node does not match the one you specified.
Mask
tab.
On
.
Save
.
You now know how to use alarms, polls, and masks, the main elements in NerveCenter behavior models. In Chapter 6, How to Use Behavior Models you will begin learning how to use behavior models to achieve monitoring of your network that is smart and relevant.
What is a Trap Mask? | Review and Summary |
29 July 2003 |