cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
252
Views
0
Helpful
3
Replies

Cisco Nexus EEM Trigger

hs08
Spotlight
Spotlight

Hello,

I successful create EEM script to backup the startup config to SCP server daily. 

When i want to implement to Cisco Nexus i can see there is no event timer or event none for triggering the EEM.

Anyone know how we can schedule the EEM on Nexus?

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @hs08 

On Nexus switches, the EEM does not support event timers or the event none option, as it does on IOS platforms.

However, you can still schedule tasks like configuration backups using NX-OS Bash or Python scripts along with the scheduler feature, which provides a way to run commands at scheduled intervals. By using the scheduler feature, you can set up automated backups without relying on EEM in NX-OS. 

Create your script using bash or python that will perform the backup operation. 

copy running-config scp://username@scpserver:/path/to/backup.cfg

Save this script to the Nexus switch's file system, for example /bootflash/backup_script.sh.

Next, configure the scheduler to run this script at a specific time ; assuming the feature scheduler is activated.
conf t
scheduler job name backup_job
bash bootflash:/backup_script.sh
exit

Next, create a schedule to run the job:

scheduler schedule name daily_backup
job name backup_job
time start 00:00 repeat 24:00
exit

--Check:
show scheduler schedule

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/7-x/system_management/configuration/guide/b_Cisco_Nexus_9000_Series_NX-OS_System_Management_Configuration_Guide_7x/b_Cisco_Nexus_9000_Series_NX-OS_System_Management_Configuration_...

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

3 Replies 3

M02@rt37
VIP
VIP

Hello @hs08 

On Nexus switches, the EEM does not support event timers or the event none option, as it does on IOS platforms.

However, you can still schedule tasks like configuration backups using NX-OS Bash or Python scripts along with the scheduler feature, which provides a way to run commands at scheduled intervals. By using the scheduler feature, you can set up automated backups without relying on EEM in NX-OS. 

Create your script using bash or python that will perform the backup operation. 

copy running-config scp://username@scpserver:/path/to/backup.cfg

Save this script to the Nexus switch's file system, for example /bootflash/backup_script.sh.

Next, configure the scheduler to run this script at a specific time ; assuming the feature scheduler is activated.
conf t
scheduler job name backup_job
bash bootflash:/backup_script.sh
exit

Next, create a schedule to run the job:

scheduler schedule name daily_backup
job name backup_job
time start 00:00 repeat 24:00
exit

--Check:
show scheduler schedule

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/7-x/system_management/configuration/guide/b_Cisco_Nexus_9000_Series_NX-OS_System_Management_Configuration_Guide_7x/b_Cisco_Nexus_9000_Series_NX-OS_System_Management_Configuration_...

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

hs08
Spotlight
Spotlight

Hi M02@rt37 

It's work, thanks.

Perfect. You're so welcome @hs08 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Review Cisco Networking for a $25 gift card