06-26-2022 07:35 AM
hello!
i am interested to know if there is any way to create an EEM script that will send via syslog the verison of my NEXUS.
for example:
event manager applet VERISON_CHECK
event cli match "copy running-config startup-config"
-> and then i want it to execute the following command and send the result via syslog :
show ver | sec NXOS | sec nxos.
would appreciate any help, thank you.
06-26-2022 09:19 AM
try this :
action 1.0 cli command "show version | in "System version:""
action 2.0 regexp "version: (.*)\r" "$_cli_result" ver
action 3.0 syslog msg "nexus currect running version $ver"
06-29-2022 12:19 AM
Thank you for your answer!
it doesn’t work, NEXUS 9000 does not have this commands for EEM.
That’s my problem
06-29-2022 01:48 AM - edited 06-29-2022 01:52 PM
Apologies that did not work for you, what is the error you get, the EEM I gave was in general (let me test what is not working)
EDIT: you are right that the command regex not taking, Option only has here is to use TCL or Phython.
06-29-2022 12:56 PM
Hello,
do you have network-admin user privileges on the Nexus ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide