[Contents] [Prev] [Next] [Index] [Report an Error]

Representing the Correlating Event in an Event Policy

Consider the following example:

event-options {
    policy p1 {
        events [ e1 e2 e3 ];
        within 60 events [ e4 e5 e6 ];
        then {
            execute-commands {
                commands {
                    "show interfaces {$$.interface-name}";
                    "show interfaces {$e4.interface-name}";
                    "show interfaces {$*.interface-name}";
                }
                output-filename command-output.txt;
                destination some-dest;
            }
        }
    }
}

In the show interfaces {$$.interface-name} command, {$$.interface-name} is substituted with the value of the interface-name attribute of event e1, e2, or e3.

In the show interfaces {$e4.interface-name} command, {$e4.interface-name} is substituted with the value of the interface-name attribute of the most recent e4 event.

In the show interfaces {$*.interface-name} command, {$*.interface-name} is substituted with the value of the interface-name attribute of the most recent e4, e5, or e6 event. If e4 is received within 60 seconds of e1, e2, or e3, {$*.interface-name} is substituted with the value of the interface-name attribute for e4. Otherwise, if e5 is received within 60 seconds of e1, e2, or e3, {$*.interface-name} is substituted with the value of the interface-name attribute for e5. Else, if e6 is received within 60 seconds of e1, e2, or e3, {$*.interface-name} is substituted with the value of the interface-name attribute for e6. If the correlating event (e4, e5, or e6) does not have an interface-name attribute, the software does not execute the show interfaces {$*.interface-name} command.

If both e4 and e5 are received within 60 seconds of e1, then {$*.interface-name} is substituted with the value of the interface-name attribute for e4. This is because the event process (eventd) searches for correlating events in sequential order as configured in the within statement. In this case, the order is e4 > e5 > e6.


[Contents] [Prev] [Next] [Index] [Report an Error]