Which configuration saves the running configuration to the startup configuration and logs a “saving configuration automatically” message when a syslog message that contains “SYS-5-CONFIG_I” is received?
C is the correct answer
"SYS-5-CONFIG_I" This pattern appears when you do a config change in the conf t mode.
so the purpose of this script is to save the running config every time someone changes any configuration.
and also this pattern will only appear when the configuration has been made through an interactive session "_I".
so after we concluded that this pattern appeared in conf t we can all agree that the script needs to use the command "end" before applying the save running command
For me... option C and D are correct doing the same thing (tested EVE-NG)... but we have to choose one.. For me I will go with D because if we have 2 users configuring and one of them exits the conf mode, option C will close the conf mode for the 2nd user.
See for yourself:
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#event manager applet save_config
R1(config-applet)#event syslog pattern "%SYS-5-CONFIG_I" period 1
R1(config-applet)#action 1.0 cli command "write mem"
R1(config-applet)#action 2.0 syslog msg "saving configuration automatically"
R1(config-applet)#exit
R1(config)#end
R1#
*Feb 12 21:20:49.811: %SYS-5-CONFIG_I: Configured from console by console
R1#
*Feb 12 21:20:49.948: %HA_EM-6-LOG: save_config: saving configuration automatically
R1#
R1#sh event manager history events
No. Job Id Proc Status Time of Event Event Type Name
1 1 Actv success Wed Feb12 21:20:49 2025 syslog applet: save_config
A: Wrong --- There is no event track command
B: Wrong --- There is no string match command
C: Wrong --- No inverted commas after the command in action 2.0
D: Correct --- Tested in the lab environment.
Note: "enable" command not required because the prompt is already in privilege mode when "SYS-5-CONFIG_I" message appears.
event manager applet save_config
event syslog pattern "SYS-5-CONFIG_I"
#this pattern appears when you do a config change in the conf t mode.
action 1.0 cli command "enable"
#Enter privileged mode
action 2.0 cli command "wr me"
#Save the current conf
action 3.0 syslog msg "saving configuration automatically"
#send a syslog message
all option are wrong it should be as below according to my understanding
event manager applet SaveConfig
event syslog pattern "SYS-5-CONFIG_I"
action 1.0 cli command "enable"
action 2.0 cli command "copy running-config startup-config"
action 3.0 syslog msg "saving configuration automatically"
soory, my bad... if you see "SYS-5-CONFIG_I" you have returned form condf term to enable level (exit ussually) so the "end" is not needed (if you use "end" in enable level, the equipment will try toi find the domain). So, the answer would be D
The syslog pattern would be triggered after someone exited from configuration mode (using end or exit). So no need for action 'end' and no need to 'enable' as it would already be enabled.
Agree with all of you, C is then the best of the worst
event manager applet save_config
event syslog pattern "SYS-5-CONFIG_I" period 1
action 1.0 cli command "enable"
action 2.0 cli command "wr mem"
action 3.0 syslog msg "saving config"
bigyan are absolutely right, i've tested on eve and only worked after put command "enable" first
upvoted 3 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
bigyan_jhapaca4
Highly Voted 1 year, 1 month ago99a6054
1 year, 1 month ago[Removed]
1 year ago[Removed]
Highly Voted 8 months, 3 weeks agochristiannomarcenes
Most Recent 4 days, 15 hours agoabrielirus123
1 week, 3 days agoMKhalid
3 months, 3 weeks agoferdomravec87
4 months agochiacche
5 months agoShri_Fcb10
9 months agoSwiz005
9 months agoAdalberto
9 months, 3 weeks agoIgorLVG
10 months, 2 weeks agoIgorLVG
10 months, 2 weeks agoyinnymac
11 months, 1 week agoslacker_at_work
11 months, 2 weeks agoLuiggi
1 year, 1 month ago