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

Compare with Current View Page History

« Previous Version 16 Next »

Feature Description

Columns may be customised in certain opEvents tables.  This allows customers to quickly view the information that is most important to their organization.

Views That Support Custom Columns

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

Fields

Available Columns

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

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 should 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
  }

Attribute Descriptions

Adding and Removing Columns

To remove a field simply remove th associated section from the applicable json file.  To add a column add a new section in the json file.  The column placement will be relative to the order it is put in the json file.

The example below is the opEvents_action-log.json file.  The version on the left is the default version.  The version on the right adds an Event ID filed between the data and event fields, it also removes the comment field.

// VERSION=0.4.0                                 // VERSION=0.4.0
[                                                [
  {                                                {
    "name": "date",                                  "name": "date",
    "label": "Date",                                 "label": "Date",
    "search": false,                                 "search": false,
    "cell": "string",                                "cell": "string",
    "direction": "descending",                       "direction": "descending",
    "editable": false                                "editable": false
  },                                               },
  {                                                {
    "name": "event",                                 "name": "eventid",
    "label": "Event",                                "label": "Event ID",
    "cell": "string",                                "cell": "string",
    "search": false,                                 "search": false,
    "editable": false,                               "editable": false
    "cell": "LookupUrl",                           
    "replace_name": "id",                          },
    "base_url_stash_key": "event_base_url"         {
  },                                                 "name": "event",
  {                                                  "label": "Event",
    "name": "node",                                  "cell": "string",
    "label": "Node",                                 "search": false,
    "search": false,                                 "editable": false,
    "editable": false,                               "cell": "LookupUrl",
    "cell": "LookupUrl",                             "replace_name": "id",
    "base_url_stash_key": "node_base_url"            "base_url_stash_key": "event_base_url"
  },                                               },
  {                                                {
    "name": "action",                                "name": "node",
    "label": "Action",                               "label": "Node",
    "cell": "string",                                "search": false,
    "search": false,                                 "editable": false,
    "editable": false                                "cell": "LookupUrl",
  },                                                 "base_url_stash_key": "node_base_url"
  {                                                },
    "name": "details",                             {
    "label": "Details",                              "name": "action",
    "cell": "string",                                "label": "Action",
    "search": false,                                 "cell": "string",
    "editable": false                                "search": false,
  },                                                 "editable": false
  {                                                },
    "name": "comment",                             {
    "label": "Comment",                              "name": "details",
    "cell": "string",                                "label": "Details",
    "search": false,                                 "cell": "string",
    "editable": false                                "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