|
|
It is very useful to be able to monitor a portion of your network, or a specific network device, to determine whether a specific condition occurs. You can perform such monitoring when you suspect a fault in the segment or device, or just to be notified if it develops problems. Using TrafficDirector tools, you can monitor network variables as diverse as a rising data rate or the failure of a network device.
It is usually impractical to monitor a segment or device visually. Instead, you can use Watchdog to set alarms on the variables you want to monitor.
An alarm is a definition of a condition based on either rising or falling data rates, or both. When this predefined condition occurs, it is called a trap. When you set an alarm on a network device, the alarm detects a trap when it occurs. Then it does two things:
When a trap occurs, the Alert Monitor on the TrafficDirector window blinks until you acknowledge it by selecting it. You can double-click on the icon to launch the Alert Monitor application. You can also create UNIX script files that execute network or system functions when an event occurs.
Watchdog lets you establish multiple alarms on selected events associated either with an agent/domain combination, or with a resource. Then it sends you an alarm message when the data reaches the predefined threshold.
You can view a list of previous alarm messages using the Alert Monitor tool.
In this chapter, you'll learn how to start Watchdog from TrafficDirector application tools, and how you use it to set alarms. You'll also see how to view a list of existing alarms using Alert Monitor.
You start Watchdog by launching it from any of four applications:
You launch Watchdog from Domain Manager, Protocol Monitor, and Traffic Monitor to set alarms on agent/domain combinations. You launch Watchdog from Resource Manager to set alarms on a network resource.
Starting Watchdog from Domain Manager
To start Watchdog from Domain Manager:
Starting Watchdog from Protocol Monitor
To start Watchdog from Protocol Monitor:
Starting Watchdog from Traffic Monitor
To start Watchdog from Traffic Monitor:
Starting Watchdog from Resource Manager
When you launch Watchdog from Domain Manager, Protocol Monitor, or Traffic Monitor, you set alarms on agent/domain combinations. However, you can also use Watchdog to set alarms on network resources. To do this, you must launch Watchdog from Resource Manager.
To launch Watchdog from Resource Manager:
Once you have launched Watchdog from one of the four applications, you can set alarms for the agent, agent group, or resource you selected. When you want to set an alarm, follow these steps:
When the variable you've selected exceeds the thresholds you set in the Watchdog window, the agent or proxy resource sends a trap to the TrafficDirector. This triggers the Alert Monitor (see "Viewing a List of Traps Using Alert Monitor") and executes a script file, if you specified one in the Watchdog alarm set up (see "Using Traps to Execute UNIX Script Files").
This section lists and describes the Watchdog fields you fill in when you want to add an alarm to an agent or proxy resource.
You can delete an existing alarm by filling in the information for that alarm in the Watchdog window, then clicking on the Delete button.
To get system and interface information for the agent you selected when you launched Watchdog, do the following:
To exit the Watchdog window:
Viewing a List of Traps Using Alert Monitor
Traps can be generated by any agent in the network, even agents that are not related to TrafficDirector. The Alert Monitor's trap listing shows all traps sent to the IP address of your TrafficDirector console, even if they are not RMON-related traps.
The trap list displays all the messages sent on the date shown in the date field at the top of the Alert Monitor window. Each local agent also logs traps, and you can gain access to them through an inquiry to the specific agent.
When an alarm occurs, the Alert Monitor alarm clock icon at the bottom of the TrafficDirector main window flashes until you acknowledge it by clicking on the icon. Click on the icon a second time to display the Alert Monitor window.
To view a list of traps:
When you select a specific trap in the list box, information on that trap appears in the box beneath the list box.
Refreshing the Alert Monitor Display
You can update the information in the list box to show new traps. To do so, click on the Refresh button.
You can print the contents of the Alert Monitor list box for future reference. To print the contents of the list box:
To exit the Alert Monitor window:
Using Traps to Execute UNIX Script Files
When an alarm condition occurs, the alarm generates a trap. The agent sends the trap to TrafficDirector, which causes the Alert Monitor icon on the TrafficDirector Main window to blink repeatedly until you click on it to display the Alert Monitor window.
You can also use traps to execute UNIX script files. These script files can perform Alarm functions, such as sending mail messages or printing the trap information. They can also perform actions in the network, such as changing the speed of a router.
You can pass two variables from the trap to your UNIX script file, the agent name, and the severity of the trap.
For example, you may want to automatically change the speed of a WAN router if utilization reaches a certain threshold. You can write a script to change the router speed if an alarm based on utilization triggers a trap.
As a second example, you can generate a snapshot of the network if a certain threshold is reached. You can do this by writing a script file that runs the command line utility dvsnap when a certain threshold is reached.
Finally, you might want UNIX to sound an audible alarm and flash a screen message if a Severity 1 trap occurs.
This sample script file sends a mail message when a trap is received:
Copyright 1988-1996 © Cisco Systems Inc.
Selection Field
What it Displays or Selects
Variable
Indicates the variable you selected with the Variable menu (described above). This field is filled in automatically.
Sample Type
Selects Per Second Rate, Delta Value, or Absolute Value. This determines whether the alarm is triggered on the data rate, such as packets per second, a change in data rate, or on an absolute value, such as the number of packets counted.
The default sample type is Per Second Rate.Sample Interval (secs)
The interval in seconds over which the data is sampled and compared with the rising and falling thresholds. The value must be a decimal number. The allowed range is 1 - 3600 seconds.
Generate Trap When
Selects Rising Threshold, Falling Threshold, or Either. Values must be in decimal form and must be within the range of the variable being monitored. The default threshold is Rising Threshold.
· Rising Threshold. When the current sampled value is greater than or equal to this threshold, and the value at the last sampling interval was less than this threshold, the agent generates a single event. It does not generate another such event until the sampled value falls below this threshold and reaches the Falling Threshold.
· Falling Threshold. When the current sampled value is less than or equal to this threshold, and the value at the last sampling interval was greater than this threshold, the agent generates a single event. It does not generate another such event until the sampled value rises above this threshold and reaches the Rising Threshold.
· Either. The agent generates an event when either the rising or the falling threshold is reached.
Trap Community
Watchdog sends trap messages to each host registered for that community. The host from which a trap is installed is automatically registered when you create the trap. You can register additional hosts to receive traps for the community using the dvwatch utility (see Chapter 15, "Using Command Line Utilities"). The default trap community string is public.
Threshold TypeRising/Falling
These fields let you define rising and falling trap thresholds.
· Trap Descriptions. When a rising or falling alarm condition is reached, Watchdog transmits the text message entered in this field as part of the trap message to the reporting console. The default descriptions are Rising threshold reached and Falling threshold reached.
· Value. The value that triggers the trap. Values must be decimal. The allowed ranges depend on the variable you select.
· Severity. A relative rating of the severity of the trap. The value range is from 0 - 999, decimal. The severity rating of a trap appears as part of the trap information in the Alert Monitor. You can also use the severity rating of a trap in script files. (See Program Info.) These scripts let you use trapping events to trigger actions in TrafficDirector or in UNIX.
· Program Info. You can write UNIX script files and use traps to execute the scripts. In this way, you can use a trap to trigger actions in TrafficDirector or in UNIX. You can write different script files for rising or falling thresholds. You enter the script name in the Program Info field. Writing UNIX script files is discussed in the section "Using Traps to Execute UNIX Script Files."
Last Sample
The system fills in the value of the parameter selected for the last sample period.
Last Rising Trap
The system fills in the date and time of last trap condition caused by reaching the rising threshold.
Last Falling Trap
The system fills in the date and time of last trap condition caused by reaching the falling threshold.
#
# Sample shell script to be executed upon trap reception
#
# This sends a mail message to the user showing the top hosts & conversations
#
echo High utilization trap received from agent $1, priority $2 > temp.$$
echo Top 10 hosts: >> temp.$$
$NSHOME/bin/dvsnap $1 ALL HOST 30 10 >> temp.$$
echo Top 10 conversations: >> temp.$$
$NSHOME/bin/dvsnap $1 ALL CONV 30 10 >> temp.$$
mail `whoami` < temp.$$
rm temp.$$
To use traps to execute UNIX script files:
![]()
![]()
![]()
![]()
![]()
![]()
![]()