Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

commands (Event Policy Execute Commands)

 

Syntax

Hierarchy Level

Release Information

Statement introduced in Junos OS Release 7.5.

Statement introduced in Junos OS Release 9.0 for EX Series switches.

Statement introduced in Junos OS Release 13.2X51-D10 for QFX Series switches.

Description

Specify the operational mode commands to be issued when the corresponding event policy is triggered. When the event policy is triggered, the event process (eventd) executes the commands in the order in which they appear in the event policy configuration.

Note

If you include the op url command to execute a remote script as an event policy action, Python scripts are always executed using the access privileges of the generic, unprivileged user and group nobody. If you do not configure the user-name statement, SLAX and XSLT scripts are executed with root privileges.

Options

commandOperational mode command to be executed. Enclose each command in quotation marks (" ").

You can include variables in commands. The eventd process replaces each variable with values contained in the events that trigger the policy. You can use command variables of the following forms:

  • {$$.attribute-name}—The double dollar sign ($$) notation represents the event that triggers the policy. When combined with an attribute name, the variable resolves to the value of the attribute associated with the triggering event.

  • {$event.attribute-name}—The dollar sign with the event name ($event) notation represents the most recent event that matches event. When combined with an attribute name, the variable resolves to the value of the attribute associated with that event.

  • {$*.attribute-name}—The dollar sign with the asterisk ($*) notation represents the most recent event that matches any of the correlating events. The variable resolves to the value of the attribute associated with most recent event that matches any of the correlated events specified in the policy configuration.

Required Privilege Level

maintenance—To view this statement in the configuration.

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