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

Compare with Current View Page History

« Previous Version 10 Next »

Feature Description

This feature is available from opCharts version 3.2.2 and latter.  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 opCharts 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

  • Interfaces
  • Nodes
  • Scheduled Outages
  • Node Context - Node Info Widget

Available Columns

Any key value found in the nmis8/var/nmis-nodesum.json file or in the system section of the <node_name>-node.json file may be used as a property to create a column.
 

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
InterfacesopCharts_interface-list.json
NodesopEvents_raw-log.json
Scheduled OutagesopCharts_outage-schema.json
Node Context - Node Info WidgetopCharts_node-summary-table.json

Enabling the Feature

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

  • Create a directory called /usr/local/omk/conf/table_schemas
  • Copy the specific view configuration file that requires modification from /usr/local/omk/lib/json/opCharts/table_schemas/ into /usr/local/omk/conf/table_schemas.
    • Only the necessary json files should be copied to the /usr/local/omk/conf/table_schemas directory as having unecessary config files in this directory will result in future upgrades being unpredictable.

Caution!

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 'node_summary.nodeType' property.

  { "name": "node_summary.nodeType",
    "label": "Node Type",
    "cell": "String"
  },

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

Exceptions

Currently the following views do not support this feature. 

  • Dashboard
  • Events
  • Current Events

These will be offered in future releases.

  • No labels