Versions Compared

Key

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

...

Run the opEvents Purge Command

The purge action is run with the opevents-cli.exe command line utility.  When using this utility the retention period is relative to the current time and is referred to as 'purge_older_than'.  The value passed with the command my be expressed in minutes, hours, or days (combinations are also possible).  Using days as an example, if the retention period were 1 year the command line option for the retention period would like like this:

Code Block
languagetext
 act=purge_older_than_=365d

 

First run the command in simulate mode to ensure the math is correct

Code Block
[root@opmantekroot@poller-office ~]# /usr/local/omk/bin/opevents-cli.exe act=purge events_purge_older_than=52560365d debug=1 simulate=true
[Fri Dec 15 0522:5416:3128 2017] [debug] cli[3137711499] Purging unwanted database indices
[Fri Dec 15 0522:5416:3128 2017] [debug] cli[3137711499] DbPurging purgedisabled offor rawlogs: 0 entries (of 7161464) in rawLogs are older than 1y270d50m
Db purge of rawlogs: 0 entries (of 7161464) in rawLogs are older than 1y270d50m
Purging disabled for rawlogs
[Fri Dec 15 0522:5416:3128 2017] [debug] cli[31377] Simulated purging rawlogs: would remove 0 (of 7161464) entries from rawLogs
Simulated purging rawlogs: would remove 0 (of 7161464) entries from rawLogs
[Fri Dec 15 05:54:31 2017] [debug] cli[3137711499] Purging disabled for archivelogs
Purging disabled for archivelogs
[Fri Dec 15 0522:5416:3328 2017] [debug] cli[3137711499] Db purge of events: 46920440 entries (of 506091317947) in events are older than 36d12h1y
Db purge of events: 46920440 entries (of 506091317947) in events are older than 36d12h1y
[Fri Dec 15 0522:5416:3328 2017] [debug] cli[3137711499] Simulated purging events: would remove 46920440 (of 506091317947) entries from events
Simulated purging events: would remove 46920440 (of 506091317947) entries from events
[Fri Dec 15 0522:5416:3728 2017] [debug] cli[3137711499] Db purge of events: 128313340 entries (of 1380315613105) in actionlog are older than 36d12h1y
Db purge of events: 128313340 entries (of 1380315613105) in actionlog are older than 36d12h1y
[Fri Dec 15 0522:5416:3728 2017] [debug] cli[3137711499] Simulated purging events: would remove 128313340 (of 1380315613105) entries from actionlog
Simulated purging events: would remove 128313340 (of 1380315613105) entries from actionlog
[Fri Dec 15 0522:5416:3728 2017] [debug] cli[3137711499] Purging disabled for reports
Purging disabled for reports

...