-
null
- abort (Call home)
- abort (Session Manager)
- action add
- action append
- action break
- action cli
- action comment
- action continue
- action counter
- action decrement
- action divide
- action else
- action elseif
- action end
- action event-default
- action exceptionlog
- action exit
- action file
- action forceshut
- action foreach
- action if
- action ifgoto
- action increment
- action multiply
- action overbudgetshut
- action policy-default
- action publish-event
- action puts
- action reload
- action regexp
- action set
- action snmp-trap
- action string compare
- action string equal
- action string first
- action string index
- action string last
- action string length
- action string match
- action string range
- action string replace
- action string tolower
- action string toupper
- action string trim
- action string trimleft
- action string trimright
- action subtract
- action syslog
- action while
- alert-group
A Commands
This chapter describes the Cisco NX-OS system management commands that begin with the letter A.
abort (Call home)
To delete a Call home Cisco Fabric Services (CFS) configuration session without applying the configuration, use the abort command.
Syntax Description
Defaults
Command Modes
Command History
|
|
|
Usage Guidelines
The abort command is supported only on the device where the CFS fabric lock is acquired.
Examples
This example shows how to abort a Call home CFS configuration session:
Related Commands
|
|
|
|---|---|
Displays the status of the current CFS configuration session, including the last action and its result. |
|
abort (Session Manager)
To delete a Session Manager configuration session without applying the configuration, use the abort command.
Syntax Description
Defaults
Command Modes
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to abort a Session Manager configuration session and show the aborted session:
Related Commands
|
|
|
|---|---|
Displays the status of the current CFS configuration session, including the last action and its result. |
|
action add
To specify the action of adding values of two variables when an Embedded Event Manager (EEM) applet is triggered, use the action add command in applet configuration mode. To undo the add action, use the no form of the command.
action label add { long-integer | variable-name } { long-integer | variable-name }
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The result of action add is stored in the variable named $_result.
The value of the variable must be a long integer, else the action will fail.
Examples
This example shows how to add the values of two variables:
Related Commands
|
|
|
|---|---|
action append
To specify the action of appending a string value to a variable value when an Embedded Event Manager (EEM) applet is triggered, use the action append command in applet configuration mode. To undo the append action, use the no form of the command.
action label append string [ variable-value ]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If the variable does not exist, it will be created and set to the given value.
Examples
The following example shows how to configure an EEM applet to append given string value to the current value of the variable specified:
Related Commands
|
|
|
|---|---|
action break
To specify the action of exiting from a loop of actions when an Embedded Event Manager (EEM) applet is triggered, use the action break command in applet configuration mode. To disable the break action, use the no form of this command.
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use this command to skip all actions down to the related end action.
Examples
The following example shows how to configure an EEM applet to break from a loop of actions.
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action cli
To specify the action of executing a Cisco NX-OS command-line-interface (CLI) command when an Embedded Event Manager (EEM) applet is triggered, use the action cli command in applet configuration mode. To remove the action of executing a CLI command, use the no form of this command.
action label cli { command | local command } cli-string [ pattern pattern-string ]}
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The result of the execution of this command is stored in the built-in variable $_cli_result that is set when this command is run.
The action cli command ends when the solicited prompt as specified in the optional pattern keyword is received. Specifying an incorrect pattern will cause the action cli command to wait forever until the applet execution times out due to the expiration of the timer.
Examples
This example shows how to specify an EEM applet to run when the pattern keyword specifies the confirm argument for the clear counters Ethernet 0/1 command
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action comment
To specify the action of adding comments to an applet when an Embedded Event Manager (EEM) applet is triggered, use the action comment command in applet configuration mode. To disable the comment, use the no form of this command.
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use this command to add comments to applets. This results in a no-operation when the applet is run.
Examples
The following example shows how to add comments to an applet.
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action continue
To specify the action of continuing with a loop of actions when an Embedded Event Manager (EEM) applet is triggered, use the action continue command in applet configuration mode. To stop the continue action, use the no form of this command.
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Examples
The following example shows how to configure an EEM applet to continue with a loop of actions:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action counter
To specify the action of setting or modifying a named counter when an Embedded Event Manager (EEM) applet is triggered, use the action counter command in the applet configuration mode. To restore the default value to the counter, use the no form of this command.
action label counter name name value value op { dec | inc | nop | set }
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
This command does not require a license.
Use the event counter command with the action counter command when an event occurs periodically and you want an action to be implemented after a specified number of occurrences of that event.
The environment variable $_counter_value_remain is updated when the action counter command is completed.
Examples
This example shows how to set the counter count1 to the value in $variable when the EEM counter-applet is triggered:
action decrement
To specify the action of decrementing the value of a variable when an Embedded Event Manager (EEM) applet is triggered, use the action decrement command in applet configuration mode. To remove the action from the applet, use the no form of the command.
action label decrement variable-name [ long-integer]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
Related Commands
|
|
|
|---|---|
action divide
To divide the dividend value by the given divisor value when an Embedded Event Manager (EEM) applet is triggered, use the action divide command in applet configuration mode. To remove the action from the applet, use the no form of the command.
action label divide { long-integer1 | variable-name1 } { long-integer2 | variable-name2 }
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
All results of the divide action except the remainder are stored in $_result.
The remainder value of the divided integer is stored in $_remainder.
Examples
Related Commands
|
|
|
|---|---|
action else
To identify the beginning of an else conditional action block in an if/else condition action block when an Embedded Event Manager (EEM) applet is triggered, use the action else command in applet configuration mode. To remove the else conditional action block, use the no form of the command.
Syntax Description
Defaults
If the command is not specified within the applet configuration mode, the respective applet is not registered when you exit the configuration.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If a statement is not associated with this applet, events are still triggered without any action or result. A warning message stating that no statements are associated with this applet is displayed at the exit of the configuration mode.
Examples
The following example shows how to identify the beginning of an else action block:
Related Commands
action elseif
To identify the beginning of an elseif conditional action block in an else / if conditional action block when an Embedded Event Manager (EEM) applet is triggered, use the action elseif command in applet configuration mode. To remove the else conditional action block, use the no form of the command.
action label elseif string-op-1 { eq | gt | ge | lt | le | ne } string-op-2
Syntax Description
Defaults
If the command is not specified within the applet configuration mode, the respective applet is not registered when you exit the configuration.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If a statement is not associated with this applet, events are still triggered without any action or result. A warning message stating that no statements are associated with this applet is displayed at the exit of the configuration mode.
Examples
The following example shows how to identify the beginning of an elseif conditional action block:
Related Commands
action end
To identify the end of a conditional action block in the if /else and while conditional action blocks when an Embedded Event Manager (EEM) applet is triggered, use the action end command in applet configuration mode. To remove the end conditional action block, use the no form of the command.
Syntax Description
Defaults
If the command is not specified within the applet configuration mode, the respective applet is removed when you exit the configuration.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Examples
The following example shows how to identify the end of a conditional action block
Related Commands
action event-default
To specify that the default action for the event is to be performed when an Embedded Event Manager (EEM) applet is triggered, use the action event-default command. To disable the default action, use the no form of this command.
Syntax Description
Defaults
Command Modes
Command History
|
|
|
Usage Guidelines
If you want to allow the triggered event to process any default actions, you must configure the EEM policy to allow the default action. For example, if you match a CLI command in a match statement, you must add the event-default statement to the EEM policy or EEM does not allow the CLI command to execute. You can use the terminal event-manager bypass command to allow all EEM policies with CLI matches to execute the CLI command.
Examples
This example shows how to specify that the default action for the event is to be performed when an EEM applet is triggered:
action exceptionlog
To log an exception if the specific conditions are encountered when an Embedded Event Manager (EEM) applet is triggered, use the action exceptionlog command. To remove the exception log, use the no form of this command.
action label exceptionlog module module syserr error devid id errtype type errcode code phylayer layer ports list harderror error [desc string ]
no action label exceptionlog module module syserr error devid id errtype type errcode code phylayer layer ports list harderror error [desc string ]
Syntax Description
Defaults
Command Modes
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to log an EEM applet exception:
action exit
To immediately exit from the running applet configuration when an Embedded Event Manager (EEM) applet is triggered, use the action exit command in applet configuration mode. To cancel the process of immediate exit from the running applet, use the no form of the command.
Syntax Description
Defaults
If the command is not specified within the applet configuration mode, the respective applet is removed when you exit the configuration.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If a statement is not associated with the applet, events are still triggered without any action or result. A warning message stating that no statements are associated with this applet is displayed at the exit of the applet configuration mode.
Examples
The following example shows how to exit the applet configuration mode.
Related Commands
action file
To configure Embedded Event Manager (EEM) applet file operations, use the action file command in applet configuration mode. To disable the configuration, use the no form of this command.
action label file { close file-descriptor | delete file-descriptor | gets file-descriptor variable-name | open file-descriptor file-name access-permission | puts file-descriptor { string | nonewline string } | read file-descriptor variable-name [number] | write file-descriptor string [number] }
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
The following example shows how update the file with $file as file-descriptor.
action forceshut
To configure a forced shutdown of a module, a crossbar ASIC, or the entire switch when an Embedded Event Manager (EEM) applet is triggered, use the action forceshut command. To remove the forced shutdown, use the no form of this command.
action label forceshut [{ module module | xbar xbar-number }] reset-reason string
no action label forceshut [{ module module | xbar xbar-number }] reset-reason string
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to configure a forced shutdown of module 4 when an EEM applet is triggered:
action foreach
To specify the iteration of an input string using the delimiter as a tokenizing pattern, use the action foreach command in applet configuration mode. To remove the iteration of input string, use the no form of the command.
action label foreach string-iterator string-input [ string-delimiter ]
Syntax Description
Defaults
If the command is not specified within the applet configuration mode, the respective applet is not registered when you exit the configuration.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The delimiter is a regular expression pattern string. The token found in each iteration is assigned to the given iterator variable.
If a statement is not associated with this applet, events are still triggered without any action or result. A warning message stating that no statements are associated with this applet is displayed at the exit of the configuration.
Examples
The following example shows how to iterate an input string using the delimiter as a tokenizing pattern:
Related Commands
|
|
|
|---|---|
action if
To identify the beginning of an if conditional action block when an Embedded Event Manager (EEM) applet is triggered, use the action if command in applet configuration mode. To remove the if conditional action block, use the no form of the command.
action label if string-op-1 { eq | gt | ge | lt | le | ne } string-op-2
Syntax Description
Defaults
If the command is not specified within the applet configuration mode, the respective applet is not registered when you exit the configuration.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If a statement is not associated with this applet, events are still triggered without any action or result. A warning message stating that no statements are associated with this applet is displayed at the exit of the configuration mode.
Examples
The following example shows how to identify the beginning of an if conditional action block:
Related Commands
action ifgoto
To instruct the applet to jump to a given label if the specified condition is true when an Embedded Event Manager (EEM) applet is triggered, use the action ifgoto command in applet configuration mode. To cancel the process of applet jump, use the no form of the command.
action label-1 if string-op-1 { eq | gt | ge | lt | le | ne } string-op-2 goto label-2
Syntax Description
Defaults
If the command is not specified within the applet configuration mode, the respective applet is not registered when you exit the configuration.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If the goto label option is used, the action if command will not identify the beginning of the action block. Goto actions are supported only within the if/goto format.
To simulate a goto without if, use a test that is always true.
If a statement is not associated with this applet, events are still triggered without any action or result. A warning message stating that no statements are associated with this applet is displayed at the exit of the configuration mode.
Examples
The following example shows how to instruct the applet to jump to a given label:
Related Commands
action increment
To specify the action of incrementing the value of a variable when an Embedded Event Manager (EEM) applet is triggered, use the action increment command in applet configuration mode. To remove the action from the applet, use the no form of the command.
action label increment variable-name [long-integer]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
Related Commands
|
|
|
|---|---|
action multiply
To specify the action of multiplying the variable value with a given integer value when an Embedded Event Manager (EEM) applet is triggered, use the action multiply command in applet configuration mode. To remove the action from the applet, use the no form of the command.
action label multiply { long-integer1 | variable-name1 } { long-integer2 | variable-name2 }
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The result of the action multiply command is stored in $_result.
Examples
Related Commands
|
|
|
|---|---|
action overbudgetshut
To configure the shutdown of a module or the entire switch due to an overbudget power condition when an Embedded Event Manager (EEM) applet is triggered, use the action overbudgetshut command. To remove the shutdown configuration, use the no form of this command.
action label overbudgetshut [module module ]
no action label overbudgetshut [module module ]
Syntax Description
Defaults
(The default action is to powerdown just the linecards starting from slot_1 till the switch recovers from overbudget condition. In other words, skip both the supervisors (active and standby) and skip all spine/xbars, powerdown lcs starting from slot 1 onwards, till the "Available" power recovers from overbudget condition).
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to configure a power overbudget shutdown of module 4 when an EEM applet is triggered:
action policy-default
To enable the default action(s) of the policy being overridden, use the action policy-default command. To remove the default action, use the no form of this command.
no action label policy-default
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to enable the default action of a policy being overridden when an EEM applet is triggered:
action publish-event
To specify the action of publishing an application-specific event when the event specified for an Embedded Event Manager (EEM) applet is triggered, use the action publish-event command in applet configuration mode. To disable this function, use the no form of the command.
action label publish-event sub-system sub-system-id type event-type arg1 argument-data [ arg2 argument-data ] [ arg3 argument-data ] [arg4 argument-data ]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
The following example shows how a policy named EventPublish_A runs every 20 seconds and publishes an event to a well-known EEM event type numbered 1. A second policy named EventPublish_B is registered to run when the well-known EEM event type 1 occurs. When policy EventPublish _B runs, it outputs a message to syslog containing the argument 1 data passed from EventPublish_A:
Related Commands
|
|
|
|---|---|
action puts
To enable the action of printing data directly to the local terminal (tty) when an Embedded Event Manager (EEM) applet is triggered, use the action puts command in applet configuration mode. To disable this function, use the no form of the command.
action label puts [ nonewline ] string
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
action puts command applies to synchronous events. The output of this command for a synchronous applet is directly displayed to the tty, bypassing the system logger (syslog).
For an asynchronous applet, the output of this command is directed to the logger.
The nonewline keyword suppresses the display of the newline character.
Examples
The following example shows how to print data directly to the local tty:
Related Commands
|
|
|
|---|---|
Gets input from the local tty and stores the value in the given variable. |
action reload
To specify the action of reloading the switch software when an Embedded Event Manager (EEM) applet is triggered, use the action reload command in the applet configuration mode. To remove the action of reloading the switch software, use the no form of this command.
action label reload [ module module-number ]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to specify the action of reloading the switch software when an EEM applet is triggered:
action regexp
To match a regular expression pattern with an input string when an Embedded Event Manager (EEM) applet is triggered, use the action regexp command in applet configuration mode. To disable the function, use the no form of this command.
action label regexp string-pattern string-input [ string-match [ string-submatch1 ] [ string-submatch2 ] [ string-submatch3 ]]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The argument string-pattern is a regular expression. If some part of the string-input matches the pattern, it returns 1; otherwise it returns 0. This result is stored in the inbuilt variable $_regexp_result.
The optional string-match and string-submatch arguments store the results of the match .
Examples
This example shows how to define a regular expression match:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action set
To set the value of a variable when an Embedded Event Manager (EEM) applet is triggered, use the action set command in applet configuration mode. To disable this function, use the no form of the command.
action label set variable-name variable-value
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action set command to set the value of a variable when an EEM applet is triggered.
Examples
The following example shows how to set the value of a variable:
Related Commands
|
|
|
|---|---|
action snmp-trap
To specify the generation of a Simple Network Management Protocol (SNMP) trap when an Embedded Event Manager (EEM) applet is triggered, use the action snmp-trap command. To disable the SNMP trap, use the no form of this command.
action label snmp-trap [ intdata1 integer ] [ intdata2 integer ] [ strdata string ]
no action label snmp-trap [ intdata1 integer ] [ intdata2 integer ] [ strdata string ]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to specify an SNMP trap to generate when an EEM applet is triggered:
action string compare
To compare two unequal strings when an Embedded Event Manager (EEM) applet is triggered, use the action string compare command in applet configuration mode. To disable the function, use the no form of this command.
action label string compare [nocase] [length integer ] string1 string2
no action label string compare
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
String comparisons are performed on a byte-byte basis, from left to right. The command action string compare forces a comparison between two unequal strings, followed by integer comparison of the result of string comparison.
When two equal strings are compared, the result is 0.When two unequal strings are compared, if the first string is longer, the result is 1 and if the second string is longer than the first, the result is -1.
The result of string comparison is stored in the inbuilt variable $_string_result.
Examples
This example shows how to compare two unequal strings:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string equal
To verify if two strings are equal when an Embedded Event Manager (EEM) applet is triggered, use the action string equal command in applet configuration mode. To disable the function, use the no form of this command.
action label string equal [nocase] [length integer ] string1 string2
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If two strings are equal, it returns 1.
The result of string comparison is stored in the inbuilt variable $_string_result.
Examples
This example shows how to verify if two strings are equal:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string first
To get the index of the first occurrence of string1 within string2 when an Embedded Event Manager (EEM) applet is triggered, use the action string first command in applet configuration mode. To disable the function, use the no form of this command.
action label string first string1 string2 [ index-value ]
Syntax Description
Defaults
The index is not returned on the first occurrence of string1 within string2.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
On the first occurrence of string1, the index is placed in string2. If string1 is not found, it returns -1.
The result of string comparison is stored in the inbuilt variable $_string_result.
Examples
This example shows how to get the index of the first occurrence of string1 within string2 :
Related Commands
|
|
|
|---|---|
Returns the index of the last occurrence of string1 within string2 |
|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string index
To get the characters specified at a given index value when an Embedded Event Manager (EEM) applet is triggered, use the action string index command in applet configuration mode. To disable the function, use the no form of this command.
action label string index string [ value | end ]
Syntax Description
Defaults
The characters specified at a given index value are not returned.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The index count starts from zero. Use the end argument for the last character of the string.
The command stores the characters in the inbuilt variable $_string_result.
Examples
This example shows how to get the character specified at a given index value:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string last
To get the index of the last occurrence of string1 within string2 when an Embedded Event Manager (EEM) applet is triggered, use the action string last command in applet configuration mode. To disable the function, use the no form of this command.
action label string last string1 string2 [ index-value ]
Syntax Description
Defaults
The index is not returned on the last occurrence of string1 within string2.
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
On the last occurrence of string1, the index is placed in string2. If string1 is not found, it returns -1.
The result of string comparison is stored in the inbuilt variable $_string_result.
Examples
This example shows how to get the index of the last occurrence of string1 within string2 :
Related Commands
|
|
|
|---|---|
Returns the index of the first occurrence of string1 within string2 |
|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string length
To get the number of characters in a string when an Embedded Event Manager (EEM) applet is triggered, use the action string length command in applet configuration mode. To disable the function, use the no form of this command.
action label string length string
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The result of the command is stored the in the inbuilt variable $_string_result.
Examples
This example shows how to get the number of characters in a string:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string match
To match a pattern of characters with a string when an Embedded Event Manager (EEM) applet is triggered, use the action string match command in applet configuration mode. To disable the function, use the no form of this command.
action label string match [nocase] string-pattern string
Syntax Description
Defaults
Results of pattern matching of strings are not returned to the variable $_string_result
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
If the string matches the specified pattern, result is 1; if the string does not match the specified pattern, the result is 0.
The result of the command is stored the in the inbuilt variable $_string_result.
Examples
This example shows how to match a string pattern with a string:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string range
To store a range of characters in a string when an Embedded Event Manager (EEM) applet is triggered, use the action string range command in applet configuration mode. To disable the function, use the no form of this command.
action label string range string start-index end-index
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
The start-index and end-index arguments specify the range of characters in a string on which to operate.
The result of the command is stored the in the built-in variable $_string_result.
Examples
This example shows how to store a range of characters in a specified string:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string replace
To store a new string by replacing the range of characters in the specified string when an Embedded Event Manager (EEM) applet is triggered, use the action string replace command in applet configuration mode. To disable the function, use the no form of this command.
action label string replace string start-index end-index [new-string]
no action label string replace
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action string replace command to get a new string by replacing specific characters in a particular string when an EEM applet is triggered. If the value for new-string argument is not specified, the characters are replaced with white space.
The result of the command is stored the in the built-in variable $_string_result.
Examples
This example shows how to store a range of characters in a specified string:
Related Commands
|
|
|
|---|---|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string tolower
To store a specific range of characters of a string in lowercase when an Embedded Event Manager (EEM) applet is triggered, use the action string tolower command in applet configuration mode. To disable the function, use the no form of this command.
action label string tolower string [start-index] [end-index]
no action label string tolower
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action string tolower command to store a specific range of characters in lower case when an EEM applet is triggered. The start-index and end-index arguments specify the range of characters on which to operate.
The result of the command is stored the in the built-in variable $_string_result.
Examples
This example shows how to convert a range of characters in a specified string, to lower case:
Related Commands
|
|
|
|---|---|
Stores a specific range of characters of a string in upper case. |
|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string toupper
To store a specific range of characters of a string in uppercase when an Embedded Event Manager (EEM) applet is triggered, use the action string toupper command in applet configuration mode. To disable the function, use the no form of this command.
action label string toupper string [start-index] [end-index]
no action label string toupper
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action string toupper command to store a specific range of characters in upper case when an EEM applet is triggered. The start-index and end-index arguments specify the range of characters on which to operate.
The result of the command is stored the in the built-in variable $_string_result.
Examples
This example shows how to convert a range of characters in a specified string, to lower case:
Related Commands
|
|
|
|---|---|
Stores a specific range of characters of a string in lower case. |
|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string trim
To trim a string when an Embedded Event Manager (EEM) applet is triggered, use the action string trim command in applet configuration mode. To disable the function, use the no form of this command.
action label string trim string1 [string2]
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action string trim command to trim the characters in a string when an EEM applet is triggered. The command trims characters in string2 from both ends of string1. By default, string2 is whitespace.
The result of the command is stored the in the built-in variable $_string_result.
Examples
This example shows how to trim a string:
Related Commands
action string trimleft
To trim the characters of one string from the left end of another string when an Embedded Event Manager (EEM) applet is triggered, use the action string trimleft command in applet configuration mode. To disable the function, use the no form of this command.
action label string trimleft string1 [string2]
no action label string trimleft
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action string trimleft command to trim a string from left end of another string when an EEM applet is triggered. The command trims characters specified by string2 from the left end of string1. By default, string2 is whitespace.
The result of the command is stored the in the built-in variable $_string_result.
Examples
This example shows how to trim a string:
Related Commands
|
|
|
|---|---|
Trims the characters of one string from the right end of another string. |
|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action string trimright
To trim the characters of one string from the right end of another string when an Embedded Event Manager (EEM) applet is triggered, use the action string trimright command in applet configuration mode. To disable the function, use the no form of this command.
action label string trimright string1 [string2]
no action label string trimright
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action string trimright command to trim a string from right end of another string when an EEM applet is triggered. The command trims characters specified by string2 from right end of string1. By default, string2 is whitespace.
The result of the command is stored the in the built-in variable $_string_result.
Examples
This example shows how to trim a string:
Related Commands
|
|
|
|---|---|
Trims the characters of one string from the left end of another string. |
|
Registers an applet with the Embedded Event Manager (EEM) and enters the applet configuration mode. |
action subtract
To specify the action of subtracting the value of a variable from another value when an Embedded Event Manager (EEM) applet is triggered, use the action subtract command in applet configuration mode. To remove the action from the applet, use the no form of the command.
action label subtract { long-integer1 | variable-name1} {long-integer2 | variable-name2}
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use this command to subtract the value of the second parameter from the first parameter.
The result of the action subtract command is stored in $_result.
Examples
Related Commands
|
|
|
|---|---|
action syslog
To configure a syslog message to generate when an Embedded Event Manager (EEM) applet is triggered, use the action syslog command. To disable the syslog message, use the no form of this command.
action label syslog [ priority { prio | prio-str }] msg msg-text
no action label syslog [ priority { prio | prio-str }] msg msg-text
Syntax Description
Defaults
Command Modes
Command History
|
|
|
Usage Guidelines
Messages written to syslog from an EEM applet are not screened for EEM syslog events, which may lead to recursive EEM syslog events. Messages that are sent from an EEM applet include the applet name for identification.
Examples
This example shows how to configure a syslog message to save when an EEM applet is triggered:
action while
To identify the beginning of a loop of a conditional block when an Embedded Event Manager applet is triggered, use the action while command in applet configuration mode. To disable this function, use the no form of the command.
action label while string1 operator string2
Syntax Description
Defaults
Command Modes
Applet configuration (config-applet)
Command History
|
|
|
Usage Guidelines
Use the action while command to identify the beginning of a loop conditional block.
If $_variable is found within a string, it will be substituted before the expression is tested.
Examples
The following example shows how to identify the beginning of a loop conditional block when an EEM applet is triggered:
Related Commands
|
|
|
|---|---|
Identifies the beginning of an else block in the if/else conditional block |
|
alert-group
To configure a Call home CLI command for an alert group, use the alert-group command. To remove the command from the alert group, use the no form of this command.
alert-group { All | Configuration | Diagnostic | EEM | Environmental | Inventory | License | Linecard-Hardware | Supervisor-Hardware | Syslog-group-port | System | Test } user-def-cmd cli_command
no alert-group { All | Configuration | Diagnostic | Environmental | Inventory | License | Linecard-Hardware | Supervisor-Hardware | Syslog-group-port | System | Test } user-def-cmd cli_command
Syntax Description
Defaults
Command Modes
Command History
|
|
|
Usage Guidelines
Examples
This example shows how to add the show ip routing command to the configuration alert group:
switch(config-callhome)# alert-group Configuration user-def-cmd “show ip routing”
Related Commands
|
|
|
|---|---|
Feedback