Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please feel free to leave comments and suggestions below!

Purging events

opEvents can produce a lot of data and it is important to have a purging policy. For this, we can set up a cron job, as an example: 

Code Block
# purge the database once weekly
12 3 * * 5              root /usr/local/opmojo/bin/opevents-cli.pl act=purge

opEvents will only cleanup the data types that have a purging policy. For this, you can update omk/conf/opCommon.nmis: 

Code Block
'opevents_events_purge_older_than' => 43200, # Minutes!! Will cleanup events older than 30 days.
#'opevents_rawlogs_purge_older_than' => 43200, 
#'opevents_archivelogs_purge_older_than' => 43200, 
#'opevents_reports_purge_older_than' => 43200,  

As an output example: 


Code Block
omk$ ./bin/opevents-cli.pl act=purge debug=9
Purging disabled for rawlogs
Purging disabled for archivelogs
Db purge of events: 646 entries (of 1872749) in events are older than 30d
Purged events: removed 646 records from events
Db purge of events: 322 entries (of 1185634) in actionlog are older than 30d
Purged events: removed 322 records from actionlog
Purging disabled for reports



What's next? 

...