Feature Description

This is an advanced feature that allows customers to modify the data presented in tables.  The default table content has been carefully selected based on Opmantek's numerous years of network management experience.  This said there are cases where customers would like to alter the table data to display information that is important to their organisation.  Most opEvents pages with table data can be customised to display different content.  This feature allows table columns to be removed or added as required.

If when following these steps the View that is being modified does not behave normally; remove the custom configuration file and normality should be restored.

 

Views That Support Custom Columns

Available Columns

Columns properties that may be added can found here:  opEvents Normalised Event Properties

Configuration

Configuration Files

Each view has a separate configuration file that will be found in the following directory (by default this directory does not exist; reference the next step):

/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
Current Events

opEvents_current-events.json

opEvents_active-events.json

Events by Node (Dashboard)opEvents_index_events.json
EventsopEvents_current-events.json

Enabling the Feature

In order to enable this feature the following must be done.

Enable this feature with care. 

Future opEvents upgrades will need to be watched carefully as tables and event properties can change across versions.  Based on this an upgrade has the potential to break the functionality of a custom table configuration.  If this feature is enabled it is highly recommend to upgrade in a test environment prior to upgrading the production environment.

 

Configuration

The configuration files are json files that have a specific syntax that must be observed.  Add the desired property 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.

Property Attributes

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

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

Attribute Descriptions

Adding and Removing Columns

To remove a column simply remove the 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 column between the data and event columns, it also removes the comment column.

// 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",

    "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
]                                                  }
                                                  ]

 

For example, the image below shows the default menu bar for the Actions view in opEvents.

After editing the opEvents_action-log.json file the extra column was added to the end of the row labeled "New Custom Column". This process can be replicated to display custom information in as many columns as you would like on this page.

Verification

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

 

Event Context

For the Event Context node summary data can be displayed using opevents_gui_event_node_summary_list config option in opCommon.nmis

By default these properties are displayed in the gui, any changes will require the omkd daemon to be restarted.

'opevents_gui_event_node_summary_list' => ["name","group","location","customer","businessService","host"]