commands
Syntax
commands {"command";}Hierarchy Level
[editevent-optionspolicypolicy-namethenexecute-commands]Release Information
Statement introduced in JUNOS Release 7.5.
Description
Specify an operational mode command to be issued on receipt of an event.
Options
command—Command to be issued. Enclose each command in quotation marks (" "). The event process (eventd) issues the commands in the order in which they appear in the configuration.You can include variables in commands. The eventd process replaces each variable with values contained in the event that triggers the policy. You can use command variables of the following forms:
{$$.attribute-name}—The double-dollar-sign notation ($$) represents the event that is triggering a policy. When combined with an attribute name, the command variable is replaced by the value of the attribute name of the triggering event. For example, when a policy runs theshow interfaces {$$.interface-name}command,the{$$.interface-name}variable is replaced by the value of theinterface-nameattribute in the triggering event.{$event.attribute-name}—The{$event.attribute-name}notation represents the most recent event that matches the specified event. The variable is replaced by the value of the attribute name of the most recent event that matchesevent. For example, when a policy runs theshow interfaces {$e1.interface-name}command, the{$e1.interface-name}variable is replaced by the most recente1event cached by the eventd process.Usage Guidelines
See Executing Operational Mode Commands.
Required Privilege Level
maintenance—To view this statement in the configuration.
maintenance-control—To add this statement to the configuration.