How to create a watch for multiples conditions
search cancel

How to create a watch for multiples conditions

book

Article ID: 408570

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

A watch was created to check the status of an attribute value in a table for multiple instances and for multiple conditions. But it is not working.

https://oid-base.com/get/1.3.6.1.2.1.14.10.1.6

Description:
ospfNbrState OBJECT-TYPE
SYNTAX INTEGER {
down (1),
attempt (2),
init (3),
twoWay (4),
exchangeStart (5),
exchange (6),
loading (7),
full (8)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The state of the relationship with this neighbor."
REFERENCE
"OSPF Version 2, Section 10.1 Neighbor States"
DEFVAL { down }

 

If the ospfNbrState value is 1,2,3,5,6 or 7 generate an alarm.

If the ospfNbrState value is 4 or 8 clear the alarm.

Environment

DX NetOps Spectrum: Any version

Resolution

This is the spoken expression: Generate alarm only when the ospfNbrState value is different from 4 and 8.

This is real expression: ((ospfNbrState.#!=4)&(ospfNbrState.#!=8))

Note that the expression is evaluating the same instance (#).

Suppose the ospfNbrState value is 1: TRUE & TRUE = TRUE (generate alarm)

Suppose the ospfNbrState value is 2: TRUE & TRUE = TRUE (generate alarm)

Suppose the ospfNbrState value is 3: TRUE & TRUE = TRUE (generate alarm)

Suppose the ospfNbrState value is 4: FALSE & TRUE = FALSE (clear alarm)

Suppose the ospfNbrState value is 5: TRUE & TRUE = TRUE (generate alarm)

Suppose the ospfNbrState value is 6: TRUE & TRUE = TRUE (generate alarm)

Suppose the ospfNbrState value is 7: TRUE & TRUE = TRUE (generate alarm)

Suppose the ospfNbrState value is 8: TRUE & FALSE = FALSE (clear alarm)

 

1) In the Expression tab:

  • Name: ospfNbrState_pollingAgent
  • Data Type: Boolean
  • Expression: ((ospfNbrState.#!=4)&(ospfNbrState.#!=8))
  • Instance: All

Only when the ospfNbrState value is different (!=) from 4 and (&8 an alarm should be generated.

2) In the Properties tab:

  • Active By Default: Unchecked
  • Evaluation: Evaluating By Polling - Polling Interval 300 seconds
  • Model Type: Modify watch for model type OSPF2RtrApp
  • Make Inheritable: Checked

3) In the Threshold tab:

  • Attach a Threshold: Checked
  • Threshold violated if value == TRUE
  • Threshold reset if value != TRUE
  • Notification: Generate Alarm