Configuring Event Policy
Event policies can monitor specific events, create log files, invoke Junos OS commands, and invoke event scripts. This chapter discusses the command-line interface (CLI) statements for configuring event policies.
To configure event policy, include the following statements at the [edit event-options] hierarchy level:
[edit event-options]destinations {destination-name {archive-sites {url <password password>;}transfer-delay seconds;}}generate-event event-name {time-interval seconds;time-of-day hh:mm:ss;}policy policy-name {attributes-match {event1.attribute-name equals event2.attribute-name;event.attribute-name matches regular-expression;event1.attribute-name starts-with event2.attribute-name;}events [ events ];within seconds {events [ events ];not events [ events ];trigger (on | after | until) event-count;}then {event-script filename {arguments {argument-name argument-value;}destination destination-name {retry-count number retry-interval seconds;transfer-delay seconds;}output-filename filename;output-format (text | xml);user-name name;}execute-commands {commands {"command";}destination destination-name {retry-count number retry-interval seconds;transfer-delay seconds;}output-filename filename;output-format (text | xml);user-name username;}ignore;raise-trap;upload filename (filename | committed) destination destination-name {retry-count number retry-interval seconds;transfer-delay seconds;user-name username;}}}traceoptions {file <filename> <files number> <match regular-expression> <size size> <world-readable |
no-world-readable>;flag flag;no-remote-trace;}
This chapter discusses the following topics:
- Using Correlated Events to Trigger an Event Policy
- Representing the Correlating Event in an Event Policy
- Triggering an Event Policy Based on Event Count
- Using Regular Expressions to Refine the Set of Events That Trigger a Policy
- Generating Internal Events to Trigger Event Policies
- Using Nonstandard System Log Messages to Trigger Event Policies
- Defining Destinations for File Archiving by Event Policies
- Configuring an Event Policy to Upload Files
- Configuring the Delay Before Files Are Uploaded by an Event Policy
- Configuring an Event Policy to Retry the File Upload Action
- Configuring an Event Policy to Execute Operational Mode Commands
- Executing Event Scripts in an Event Policy
- Configuring Event Policies to Ignore an Event
- Changing the User Privilege Level for an Event Policy Action
- Configuring Event Policies to Raise SNMP Traps
- Tracing Event Policy Processing
Hide Navigation Pane
Show Navigation Pane
Download
SHA1