Date: Fri, 29 Mar 2024 09:08:22 +0000 (UTC) Message-ID: <1111522202.4083.1711703302924@skald.opmantek.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4082_1883190518.1711703302923" ------=_Part_4082_1883190518.1711703302923 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Version 2.0.0 (and newer) of opEvents provides a new mechanism for expir= ing 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.
Important, Versions of opEvents Prior to 2.4.2 will not hav= e a purging policy configured by default, the installer will prompt to enab= le the default policy.
opEvents can expire four different types of old data independently:
Your desired purging policy is defined by setting one or more of the fol=
lowing four configuration properties in conf/opCommon.nmis
(or opCommon.json in opEvents 3.0+). Here is the commented example f=
rom install/opCommon.nmis(json)
:
'opevents' =3D>= ; { # lots of other directives... # how long should things be kept in the db? format NN[dhm]MM[hm]..., plai= n N means N minutes. 0 or undef means no purging. 'opevents_reports_purge_older_than' =3D> 730d, # covers summary re= ports 'opevents_events_purge_older_than' =3D> 180d, # covers events and= actions 'opevents_rawlogs_purge_older_than' =3D> 90d, # covers raw logs 'opevents_archivelogs_purge_older_than' =3D> 365d, # covers archive lo= gs
The configuration is pretty straightforward:
undef
mean=
s no purging whatsoever.31d12h
means "purge data older than 31 days and 1=
2 hours" (as does 12h31d
).The expiration of old data is performed by opeventsd.pl
if =
and when it is started with the argument act=3Dpurge
. You=
can also instruct it to only tell you how many entries a purge run wou=
ld remove (without removing anything) by giving the arguments
By default the installer for opEvents 2.0 will create a suitable cron sc=
hedule 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, for purging and report tasks:
# this cron sched= ule 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=3Dpu= rge # create daily summary reports 0 9 * * * root /usr/local/opmojo/bin/opevents-cli.pl act=3Dcr= eate-report daily=3Dtrue 0 15 * * * root /usr/local/opmojo/bin/opevents-cli.pl act=3Dcr= eate-report daily=3Dtrue # create weekly summary reports 32 3 * * 1 root /usr/local/opmojo/bin/opevents-cli.pl act=3Dcr= eate-report weekly=3Dtrue # create monthly summary reports 43 4 1 * * root /usr/local/opmojo/bin/opevents-cli.pl act=3Dcr= eate-report monthly=3Dtrue