Create and Edit a Watch

Contents
casp1032
 
 
You can create watches to monitor selected attributes of network models.
 
Follow these steps:
 
  1. Click the Information tab for a model, and expand the Thresholds And Watches subview.
  2. Expand the Watches subview.
    The Watches table appears.
  3. On the toolbar in the Watches subview, click Create a new watch  create_watch_icon .
    The Create Watch dialog opens.
     The Expression tab is selected by default.
  4. 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.
  5. 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.
  6. Click the Properties tab and specify the following settings:
    •  
      Active By Default
      Specifies 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 affect 
      SpectroSERVER
       performance.
    •  
      Evaluate On Demand
      Evaluates the watch expression only when the watch attribute is read.
    •  
      Evaluate On Change
      Evaluates the watch expression if any attribute in the watch expression changes. The attributes must have either the Memory or Database flag set.
    •  
      Evaluate By Polling
      Evaluates the watch after each poll interval.
    •  
      Poll Interval
      Specifies 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 type 
      model type
       
      Specifies 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 Inheritable
      Makes the watch available for models of all model types that are derived from the selected model type.
  7. 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.
  8. 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 value
      Specifies 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 value
      Determines 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.
  9. Specify the following Notification options. The Notification options let you specify the type of notification that is sent when the threshold is violated.
    •  
      No Notification
      Prevents notification generation when a threshold is violated.
    •  
      Generate Event(s)
      Specifies the events to be generated by the 
      DX NetOps Spectrum
       event 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.
      You can further configure these events to generate or clear alarms and to participate in Event Rules and Procedures. Events are not required for all fields; events are only generated for those fields that contain valid event codes.
    •  
      Generate Alarm
      Specifies 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.
  10. 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 threshold
      Enables script execution. Select the threshold condition that triggers script execution.
    •  
      Execute for each instance
      If enabled and the watch expression contains list attributes, the script is executed for each instance that meets the threshold condition.
    •  
      Script File
      Specifies the script file on the 
      SpectroSERVER
       to 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 the 
    SpectroSERVER
    . 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.
  11. 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.
  12. 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.
  13. 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:
 
  1. Select a watch and click edit  edit_watch_icon .
    The watch opens in the Edit Watch dialog.
  2. Select the Threshold tab, and select Generate Alarm.
    The alarm options are displayed.
  3. Click Browse.
    The Select Alarm Cause Code dialog opens. The alarm details appear at the bottom.
  4. To create a new alarm cause, click create  create_alarm_icon .
    Or, to edit it, select one from the list and click edit  edit_alarm_icon .
     
    A dialog opens to let you create or edit the alarm cause.
     The Cause Code field is read-only.
  5. 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:
 
  1. Select a watch in the Watches table and click Edit  edit_watch_icon .
    The watch opens in the Edit Watch dialog.
  2. Select Generate Alarm on the Threshold tab and click Browse.
    The Select Alarm Cause Code dialog opens.
  3. Select an alarm cause description from the list and click Copy  copy_alarm_icon .
    The Copy Alarm Cause dialog opens.
  4. Enter the cause code.
  5. (Optional) Edit other alarm properties.
  6. 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:
 
  1. Click the Information tab for a model, and expand the Thresholds And Watches subview.
  2. Expand the Watches subview.
  3. Select the watch in the Watches table and click Edit  edit_watch_icon .
    The watch opens in the Edit Watch dialog.
  4. 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:
 
  1. Select a watch in the Watches table, and click Copy Watch  spectrum--copy_watch_icon .
    The watch opens.
  2. 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:
 
  1. Select the watch in the Watches table and click Delete  spec--spwch--delete--watch--icon .
    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.
  2. (Optional) To preserve the watch on a landscape, move that landscape to the right.
  3. 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:
 
  1. Select a watch in the Watches table and click information  SPEC--Display Watch Information (1) .
    The Watch Report dialog displays the watch information.
  2. (Optional) Click Print to print the watch information.
  3. (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:
 
  1. Open the OneClick home page in a browser, and click the Administration tab.
    The Administration Pages opens.
  2. Click the Watch Reports link.
    The Generate Watch Report dialog opens. The Select Landscape list and the Select Model Type(s) list are displayed.
  3. 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.