nerdexam
Cisco

350-601 · Question #334

Refer to the exhibit. An engineer must configure Embedded Event Manager to output a message to syslog when the Cisco IOS write memory CLI command runs. Which command completes the script?

The correct answer is A. event cli pattern "write memory.*" sync yes. To configure Embedded Event Manager (EEM) to detect the execution of the Cisco IOS write memory command and output a syslog message, the event cli pattern command must be used.

Automation

Question

Refer to the exhibit. An engineer must configure Embedded Event Manager to output a message to syslog when the Cisco IOS write memory CLI command runs. Which command completes the script?

Options

  • Aevent cli pattern "write memory.*" sync yes
  • Bevent cli match "write memory.*" sync yes
  • Cevent cli regex "write memory.*" sync yes
  • Devent cli command "write memory.*" sync yes

How the community answered

(43 responses)
  • A
    91% (39)
  • B
    2% (1)
  • C
    5% (2)
  • D
    2% (1)

Why each option

To configure Embedded Event Manager (EEM) to detect the execution of the Cisco IOS write memory command and output a syslog message, the event cli pattern command must be used.

Aevent cli pattern "write memory.*" sync yesCorrect

The event cli pattern 'write memory.*' sync yes command configures an EEM event detector to trigger when a CLI command matching the specified regular expression, 'write memory.*', is executed. The pattern keyword is specifically used for regular expression matching of CLI commands within EEM.

Bevent cli match "write memory.*" sync yes

The match keyword is not the standard or correct EEM CLI event parameter for defining a regular expression pattern to detect a command.

Cevent cli regex "write memory.*" sync yes

While regex refers to regular expressions, event cli regex is not the correct EEM command syntax for defining a CLI command pattern; the correct keyword is pattern.

Devent cli command "write memory.*" sync yes

The command keyword in EEM event cli is used to match an exact command string, not a regular expression pattern.

Concept tested: EEM CLI event detection

Source: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/eem/configuration/15-mt/eem-15-mt-book/eem-cli-events.html

Topics

#Embedded Event Manager (EEM)#Cisco IOS#Event Detection#CLI Monitoring

Community Discussion

No community discussion yet for this question.

Full 350-601 Practice