Feature Description
Most opEvents pages with table data can be customised to display differnt content. This allows customers to quickly view the information that is most important to their organisation.
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
View | Configuration file |
---|---|
Actions | opEvents_action-log.json |
Raw Logs | opEvents_raw-log.json |
Archive Logs | opEvents_archive-log.json |
Nodes | opEvents_node-log.json |
Summary Reports | opEvents_summary-reports.json |
Edit Nodes | opEvents_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
- 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 support@opmantek.com.
- search: Always false
- editable: Always false
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.
Exceptions
Currently the following views do not support this feature.