Create and Edit a Watch
Contents
casp1032
You can create watches to monitor selected attributes of network models.
Follow these steps:
- Click the Information tab for a model, and expand the Thresholds And Watches subview.
- Expand the Watches subview.The Watches table appears.
- On the toolbar in the Watches subview, click Create a new watch
.
The Create Watch dialog opens.The Expression tab is selected by default. - Enter a name for the new watch and select a data type from the Data Type list.This data type is the watch destination attribute. The watch expression must evaluate to this data type.
- Build the expression for the watch by combining operators, functions, and model type attributes:
- Click a button to the left of the expression area to insert an operator or function into the watch expression at the cursor.
- Click the Attributes button and select the required attribute to insert an attribute.Set the PollingStatus attribute to True to activate a watch.
- Click the Properties tab and specify the following settings:
- Active By DefaultSpecifies whether the watch is active by default for all models that inherit the watch. If this option is not set, activate the watch manually for the desired models.Setting Active By Default for a polled watch can adversely affectSpectroSERVERperformance.
- Evaluate On DemandEvaluates the watch expression only when the watch attribute is read.
- Evaluate On ChangeEvaluates the watch expression if any attribute in the watch expression changes. The attributes must have either the Memory or Database flag set.
- Evaluate By PollingEvaluates the watch after each poll interval.
- Poll IntervalSpecifies the polling frequency in seconds. This field is enabled only if you select Evaluate By Polling.A watch does not become active if the poll interval is set to 0.
- Create watch on model typemodel typeSpecifies the model type where the watch is created. Click Browse to select a different parent model type.The watch is created on the model type of the selected model by default. However, you can select a different parent model type for the watch to let other derived model types inherit the watch.
- Make InheritableMakes the watch available for models of all model types that are derived from the selected model type.
- Click the Threshold tab and select the Attach a Threshold check box if you want to attach a threshold value to the watch.The Comparison, Notification, and Script options are enabled.
- Specify the following Comparison options. The Comparison options specify the threshold settings that specify the boundaries or limits to regulate watch notifications:
- Threshold violated if valueSpecifies the operator for threshold violations. For example, select "greater than". The threshold is considered violated if the sample returns a value that exceeds the value in the threshold attribute. For the threshold violation value, specify a constant or click Attributes to select an attribute.
- Threshold reset if valueDetermines when a threshold status of Violated is reset to Normal. For each subsequent sample after a threshold violation, this reset value is compared to the watch expression using the comparison primitive in the opposite direction. That is, if the comparison primitive is >= (greater than or equal to), the status is reset to Normal as soon as a sample returns a value that falls below this reset value. The reset value is not applicable when the Threshold Comparison is set to == or != because the watch is considered violated if the value is either greater than or less than the watch expression, irrespective of the direction. In such a situation, this option is disabled; otherwise, this entry is mandatory. For the threshold reset value, specify a constant or click the Attributes button to select an attribute.
- Specify the following Notification options. The Notification options let you specify the type of notification that is sent when the threshold is violated.
- No NotificationPrevents notification generation when a threshold is violated.
- Generate Event(s)Specifies the events to be generated by theDX NetOps Spectrumevent management system when the watch is violated or reset. Selecting this option enables fields for event codes as follows:
- when threshold is violated -- Specifies the event that is generated when the threshold is violated.
- when threshold is reset -- Specifies the event that is generated when the threshold is reset.
- when deactivated/all instances are reset -- Specifies the event that is generated when all instances of this watch are reset or when a violated watch is deactivated.
- Generate AlarmSpecifies an alarm to be generated directly if the watch threshold is violated. A generic event (0x480004) is also generated and associated with the alarm. If the watch resets and the alarm is cleared, a generic reset event (0x480005) is generated. Selecting this option enables the following fields:
- Severity -- Specifies the alarm severity as Minor, Major, or Critical.
- Description -- Specifies the alarm cause description. A generic description is provided by default. The Browse button lets you select a different cause description or create a new one. Newly created descriptions are stored on the OneClick server in the directory $INSTALL/custom/Events/CsPCause. If you have multiple OneClick servers, copy the files manually.
- User clearable -- When set, lets you manually clear the watch alarm.
- Reset watch upon user clearing alarm -- Resets the watch if the alarm is manually cleared even if the watch has not reached its reset value. The alarm can be generated again on a subsequent violation. This option is only available if User Clearable is selected.
- Specify the following Script options. The Script options let you specify a script to execute if the watch threshold is violated or cleared.
- Execute a Script when thresholdEnables script execution. Select the threshold condition that triggers script execution.
- Execute for each instanceIf enabled and the watch expression contains list attributes, the script is executed for each instance that meets the threshold condition.
- Script FileSpecifies the script file on theSpectroSERVERto execute. If no directory path is specified, the default directory, <$SPECROOT>/SS-Tools/SwScript, is used. You can change the default directory by setting sw_script_path in the file <$SPECROOT>/SS/.watchrc.
Scripts are executed by the user who starts theSpectroSERVER. Therefore, that user requires the privileges to access and execute the scripts. If a permission problem is detected during watch creation or modification, an error message appears. An event is generated if privileges are changed later and the problem is detected in an attempt to execute the script. - Click the Landscapes button to specify the destination landscapes for the watch. In the OneClick environment, you can distribute watches to multiple landscapes in a distributed server environment. New watches are created in all landscapes by default.A dialog opens with a list of landscapes.
- Move the landscapes in which you do not want to create the watch to the right.If a landscape is not available when the watch is created, you can add the watch to that landscape later. Use the Edit Watch dialog and click Landscapes.
- Click OK.The watch is created.
Create and Edit an Alarm Cause Description
You can create and edit cause descriptions for alarms that are generated for threshold violations. A notification of a threshold violation is delivered through the
DX NetOps Spectrum
event and alarm facilities. These features support notification delivery by telephone, pager, or by email using an external script interface.Follow these steps:
- Select a watch and click edit
.
The watch opens in the Edit Watch dialog. - Select the Threshold tab, and select Generate Alarm.The alarm options are displayed.
- Click Browse.The Select Alarm Cause Code dialog opens. The alarm details appear at the bottom.
- To create a new alarm cause, click create
.
Or, to edit it, select one from the list and click edit.
A dialog opens to let you create or edit the alarm cause.The Cause Code field is read-only. - Enter information in the fields as required, and click OK.The alarm cause description is created or modified.
Copy an Alarm
Use the Copy feature to create multiple alarm cause descriptions that differ only minimally from each other.
Follow these steps:
- Select a watch in the Watches table and click Edit
.
The watch opens in the Edit Watch dialog. - Select Generate Alarm on the Threshold tab and click Browse.The Select Alarm Cause Code dialog opens.
- Select an alarm cause description from the list and click Copy
.
The Copy Alarm Cause dialog opens. - Enter the cause code.
- (Optional) Edit other alarm properties.
- Click OK.The new alarm cause description is created.
Edit a Watch
You can edit a watch to change its expression, properties, and thresholds.
Follow these steps:
- Click the Information tab for a model, and expand the Thresholds And Watches subview.
- Expand the Watches subview.
- Select the watch in the Watches table and click Edit
.
The watch opens in the Edit Watch dialog. - Change the watch expression, properties, and thresholds as required, and click OK.For more information about the watch expression, properties, and thresholds, see the Create and Edit a Watch section.The watch is edited.
Copy a Watch
Use the Copy feature to create multiple watches that differ only minimally from each other.
Follow these steps:
- Select a watch in the Watches table, and click Copy Watch
.
The watch opens. - Enter a name for the new watch, change any other information as needed, and click OK.The watch is copied and a new watch is created.
Delete a Watch
You can delete a watch if you no longer require the associated threshold monitoring.
Follow these steps:
- Select the watch in the Watches table and click Delete
.
If the watch exists in multiple landscapes, a dialog opens. The left side displays the landscapes where the watch exists and from which it will be deleted. - (Optional) To preserve the watch on a landscape, move that landscape to the right.
- Click OK.The watch is deleted from the landscapes that are listed on the left.
Display Watch Information
You can display watch information to see a report about the watch. You can also print and export the information to a text file or HTML file.
Follow these steps:
- Select a watch in the Watches table and click information
.
The Watch Report dialog displays the watch information. - (Optional) Click Print to print the watch information.
- (Optional) Click Export to save the information to a text or HTML file.The watch is printed or exported.
Generate a Report on Multiple Watches
You can generate a report about multiple watches from the OneClick Administration page.
Follow these steps:
- Open the OneClick home page in a browser, and click the Administration tab.The Administration Pages opens.
- Click the Watch Reports link.The Generate Watch Report dialog opens. The Select Landscape list and the Select Model Type(s) list are displayed.
- Select the landscape and model types for which you want to generate a report, and click Generate Report.The report is generated.
Inheritable Watch Edits
When you edit an inheritable watch, the watch definition on the selected model type is modified by default. You can select a different parent model type for the watch. Use the Browse button in the Model Type section of the Properties tab.
If a watch definition is modified for a model type that was derived from the watch’s originating model type, the changes only take effect for models of that type and its derived types. The model type where the watch originated is not changed.
For example, a watch is originally created on Gen_IF_Port and is inheritable. Serial_IF_Port is derived from Gen_IF_Port, so Serial_IF_Port models inherit the watch. If the watch definition is modified on the Gen_IF_Port model type, the changes are propagated to Serial_IF_Port models. However, if the watch definition is modified on Serial_IF_Port, the new version overrides the definition on Gen_IF_Port. Only Serial_IF_Port models are affected, while Gen_IF_Port models retain the original watch definition. As a result of the inheritance rules, you can redefine or override inheritable watches differently for derived model types.