Table of Contents |
---|
Introduction
Version 2.0.0 (and newer) of opEvents provides a new mechanism for expiring old data from the database. The purging is totally optional and no old data will be removed unless you explicitely configure opEvents to do so.
...
By default the installer for opEvents 2.0 will create a suitable cron schedule inĀ /etc/cron.d/opevents
which triggers this action once weekly, but you can of course modify this to your liking.
And example of cron job for opEvents:
Code Block |
---|
# this cron schedule controls opEvents db purging and reporting
#
# m h dom month dow user command
#
# purge the database once weekly
12 3 * * 5 root /usr/local/opmojo/bin/opevents-cli.pl act=purge
# create daily summary reports
0 9 * * * root /usr/local/opmojo/bin/opevents-cli.pl act=create-report daily=true
0 15 * * * root /usr/local/opmojo/bin/opevents-cli.pl act=create-report daily=true
# create weekly summary reports
32 3 * * 1 root /usr/local/opmojo/bin/opevents-cli.pl act=create-report weekly=true
# create monthly summary reports
43 4 1 * * root /usr/local/opmojo/bin/opevents-cli.pl act=create-report monthly=true |