cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2038
Views
1
Helpful
15
Replies

Periodic log generation for syslog server

Flash Bang
Level 1
Level 1

Hi guys,

I' m trying to configure MDS switches to genrate log in particular period of time. I have tryed to walk throught event manager and also scheduler but no success. Any ideas how to achieve this goal ?

Regards

15 Replies 15

This is what worked for me:

1. Created a python script to generate the log:

     1.1 open notepad++ and paste the following:

             #!/usr/bin/env python3
             import cli
             cli.cli('syslog priority notifications msg Keepalive: Device is alive')

      1.2 Save the file as keepalive.py and copy it to switch bootflash:

2. Create a scheduler job

3. Schedule to run the script every 5 min (you can adjust the time according to your needs)

Complete configuration :

scheduler job name python-keepalive
     python3 bootflash:/keepalive.py

end-job

scheduler schedule name keepalive
     job name python-keepalive
     time start now repeat 0:0:5