Technical Documentation

policy

Syntax

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 ];
then {
... the then subhierarchy appears at the end of the [edit event-options policy policy-name] hierarchy level ...
}
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 count retry-interval seconds;
transfer-delay seconds;
}
output-filename filename;
output-format (text | xml);
user-name username;
}
execute-commands {
commands {
"command";
}
destination destination-name {
retry-count count 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 count retry-interval seconds;
transfer-delay seconds;
user-name username;
}
}
}

Hierarchy Level

[edit event-options]

Release Information

Statement introduced in JUNOS Release 7.5.

Description

Define an event policy to be processed by the eventd process. If you configure a policy, the events and then statements are mandatory.

You can configure multiple policies to be processed for an event. The policies are executed in the order in which they appear in the configuration. If you configure more than one policy for an event, and if one of the policies is to ignore the event, no policies that follow the ignore statement are executed.

Default

If you do not configure a policy for an event, the event is recorded in the system log.

Options

policy-name—Name of an event policy.

The statements are explained separately.

Required Privilege Level

maintenance—To view this statement in the configuration.
maintenance-control—To add this statement to the configuration.


Published: 2009-10-16