You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Feature Description

Custom fields can be configured in opEvents.  This article will describe where and how this is possible.

Views That Support Custom Fields

  • Actions
  • Raw Logs
  • Archive Logs
  • Nodes
  • Summary Reports
  • Edit Nodes

Fields

Available Fields

Fields that can be added as a column may be found here:  opEvents Normalised Event Properties

Field Attributes

TBD

Configuration

Enabling the Feature

In order to enable this feature a directory must be copied into the standard omk config directory.

[root@opmantek ~]# cp -r /usr/local/omk/lib/json/opEvents/table_schemas/ /usr/local/omk/conf/.

Configuration Files

Each view has a separate configuration file that may be found in the following directory:

/usr/local/omk/conf/table_schemas

ViewConfiguration file
ActionsopEvents_action-log.json
Raw LogsopEvents_raw-log.json
Archive LogsopEvents_archive-log.json
NodesopEvents_node-log.json
Summary ReportsopEvents_summary-reports.json
Edit NodesopEvents_node-ip.json

Configuration

The configuration files are json files that have a specific syntax that must be observed.  Add the desired field to the json file in the order it would appear in.  The table will be constructed left to right based on attributed that are read from the top down.

Field Attributes

Each field that is added will require a set of attributes.  This is an example of the attributes that belong to the 'comment' field.

  {
    "name": "comment",
    "label": "Comment",
    "cell": "string",
    "search": false,
    "editable": false
  }

 

Verification

It is not necessary to restart any daemons.  After editing the associated json file simply load (or reload) the view in question. 

  • No labels