Versions Compared

Key

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

...

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`.

...

  1. Open the configuration file `EventListRules.json` at `/usr/local/omk/conf/`
  2. Under the `archiveList` block, define the rules with two keys (see the illustration below):
    • archive - the name opEvents uses 
    • regex - a Perl-style regular expression used to match log entries

      Code Block
      languagejs
      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.


  3. In the `opCommon.json`, specify the length of time you want to retain the archived logs.  

    Code Block
      "opevents_archivelogs_purge_older_than" : "365d"


  4. Save the files. 


...