...
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 may 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 | ||
---|---|---|
| ||
act### Retention period act=purge_older_than_=365d ### Entire command /usr/local/omk/bin/opevents-cli.exe act=purge events_purge_older_than=365d |
First
run the command in simulate mode to ensure the math is correctWe recommend running the purge in
Code Block |
---|
[root@poller-office ~]# /usr/local/omk/bin/opevents-cli.exe act=purge events_purge_older_than=365d debug=1 simulate=true [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Purging unwanted database indices [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Purging disabled for rawlogs Purging disabled for rawlogs [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Purging disabled for archivelogs Purging disabled for archivelogs [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Db purge of events: 0 entries (of 17947) in events are older than 1y Db purge of events: 0 entries (of 17947) in events are older than 1y [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Simulated purging events: would remove 0 (of 17947) entries from events Simulated purging events: would remove 0 (of 17947) entries from events [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Db purge of events: 0 entries (of 13105) in actionlog are older than 1y Db purge of events: 0 entries (of 13105) in actionlog are older than 1y [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Simulated purging events: would remove 0 (of 13105) entries from actionlog Simulated purging events: would remove 0 (of 13105) entries from actionlog [Fri Dec 15 22:16:28 2017] [debug] cli[11499] Purging disabled for reports Purging disabled for reports |
...