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.
Views That Support Custom Columns
- Raw Logs
- Archive Logs
- Summary Reports
- Edit Nodes
Columns properties that may be added can found here: opEvents Normalised Event Properties
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):
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/opEvents/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.
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.
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: Name of the event property (opEvents Normalised Event Properties)
- label: The column name that will render in the web page.
- cell: The cell type, usually this will be "string". For other options please contact firstname.lastname@example.org.
- search: Always false
- editable: Always false
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.
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.
It is not necessary to restart any daemons. After editing the associated json file simply load (or reload) the view in question.
Currently the following views do not support this feature.
These will be offered in future releases.