...
Enabling the Feature
To enable the Archive Loggin Logging feature, open the `opCommon.json
` file and set the configuration option `log_archive_enabled
` to `true
`.
...
- Open the configuration file `
EventListRules.json
` at `/usr/local/omk/conf/
` - Under the `
archiveList
` block, define the rules with two keys (see the illustration below):archive
- the name opEvents usesregex
- a Perl-style regular expression used to match log entriesCode Block language js title /usr/local/opmojoomk/conf/EventListRules.json "archiveList" : { "30" : { "regex" : "Node (Up|Down)", "archive" : "NodeEvents" }, "20" : { "archive" : "SoftwareErrorArchive", "regex" : "INVMEMINT|MALLOCFAIL" }, "10" : { "archive" : "SyslogArchive", "regex" : "SYS-[0123]-\\w+" } }
Info The list of rules is sorted by keys; for instance, rule 10 will run before rule 20.
In the `
opCommon.json
`, specify the length of time you want to retain the archived logs.Code Block "opevents_archivelogs_purge_older_than" : "365d"
Save the files.
...