Good morning, gentlemen,

How can I make the command that the OpConfig captures every hour (for CISCO equipment), be executed for 24 hours or once a day.

Thank you in advance for your help.


    CommentAdd your comment...

    1 answer



      Scheduling config collections is all handled through a cron job located in /etc/cron.d/opconfig

      The opconfig-cli.pl responds to the tags assigned to commands and uses that to run the jobs whenever cron calls it. Simply adjust the schedule in cron for the tags you want to run.

      1. Juan Maxia

        thank you for your information, I already made the change staying in this way, I do not know if you can tell me if it's okay. cron.d]# cat opconfig # m h dom month dow user command # run the hourly command sets once every hour # 2 * * * * root /usr/local/omk/bin/opconfig-cli.pl quiet=1 act=run_command_sets tags=HOURLY # and the daily ones 7 7 * * * root /usr/local/omk/bin/opconfig-cli.pl quiet=1 act=run_command_sets tags=DAILY 5 14 * * * root /usr/local/omk/bin/opconfig-cli.pl quiet=1 act=run_command_sets tags=HOURLY # daily import from Open-AudIT Enterprise is NOT enabled automatically # 21 21 * * * root /usr/local/omk/bin/opconfig-cli.pl act=import_audit quiet=1 # perform a daily revision purge 3 3 * * * root /usr/local/omk/bin/opconfig-cli.pl act=purge_revisions quiet=1

      2. Mark Henry

        Juan, I use crontab.guru to help me build cron schedules. With what you have now all commands with a tag of DAILY will run once daily at 7:07, the commands with a tag of HOURLY will run once daily at 14:05.

      3. Juan Maxia

        Thanks Mark Henry for your help. It was very useful.

      CommentAdd your comment...