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.
What can be purged?
opEvents can expire four different types of old data independently:
- Summary reports
- Events and Event Actions
- Raw Logs
- Archve Logs
Your desired purging policy is defined by setting one or more of the following four configuration properties in
conf/opCommon.nmis. Here is the commented example from
The configuration is pretty straightforward:
- no value, the value 0 or the special value
undefmeans no purging whatsoever.
- a purely numeric value is interpreted to mean "purge entries that are older than so many minutes".
- the system understands combinations of the units "d", "h" and "m", in any order and without any delimiting spaces.
31d12hmeans "purge data older than 31 days and 12 hours" (as does
The expiration of old data is performed by
opeventsd.pl if and when it is started with the argument
act=purge. You can also instruct it to only tell you how many entries a purge run would remove (without removing anything) by giving the arguments
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.