Example customization: OMNIbus Static Dashboard

The following examples show you how to customize the OMNIbus Static Dashboard app.

Note: Do not directly modify the custom apps supplied with the Insight® Pack. Before you implement any of the following examples, create a custom app as described in Customizing the Apps.

Removing a chart

To remove a chart from the event distribution dashboard, edit your custom .app file (for example, ITEvents_Distribution.app) and remove the corresponding JSON element.

For example, to remove the Hotspot by Node and AlertGroup chart from the dashboard, remove the following element from the charts array:

{
	  "type": "Heat Map",
	  "title": "Hotspot by Node and AlertGroup",
	  "data": {
	  "$ref": "AlertGroupVsNode"
	   },
	  "parameters": {
	  "yaxis": "AlertGroup",
	  "xaxis": "Node",
	  "category": "count"
	  }
},

When you run the App, the Hotspot by Node and AlertGroup chart is no longer available in the event dashboard.

Adding a new chart

Use the following steps to add a new heat map that shows Hotspot by Node and Location:

  1. Open your custom copy of the OMNIbus_Static_Dashboard.py file for editing.

    In the Create a new Custom App procedure described in Customizing the Apps, this file is in the $UNITY_HOME/AppFramework/Apps/ITEvents example directory.

  2. To generate the search data, add the line formatted in bold type to the file:
    dashboardObj.getSingleFieldCount(chartdata, querystring, 'Node', '5');
    dashboardObj.getSingleFieldCount(chartdata, querystring, 'AlertGroup', '5');
    dashboardObj.getSingleFieldCount(chartdata, querystring, 'Severity', '5');
    dashboardObj.getSingleFieldVsTimestamp(chartdata, querystring, 'AlertGroup', '1');
    dashboardObj.getSingleFieldVsTimestamp(chartdata, querystring, 'Severity', '10');
    dashboardObj.getSingleFieldVsTimestamp(chartdata, querystring, 'Node', '1');
    dashboardObj.getFieldaVsFieldb(chartdata, querystring, 'AlertGroup', 'Node', '5', '5');
    dashboardObj.getFieldaVsFieldb(chartdata, querystring, 'Severity', 'AlertGroup', '5', '5');
    dashboardObj.getFieldaVsFieldb(chartdata, querystring, 'Location', 'Node', '5');
  3. Add the following JSON element to the end of the charts array in your custom .app file (for example, ITEvents_Distribution.app):
    {
    	  "type": "Heat Map",
    	  "title": "Hotspot by Node and Location",
    	  "data": {
    		"$ref": "NodeVsLocation"
    		},
    	  "parameters": {
    		"yaxis": "Node",
    		"xaxis": "Location",
    		"category": "count"
    	  }
    	},

    The following table lists the values allowed for each JSON object.

    Object Values
    type Specifies the chart type.
    Depending on the functions that you add to OMNIbus_Static_Dashboard.py, the following chart types are available:
    • The getSingleFieldCount function enables the following types: Line Chart, Pie Chart, Simple Bar Chart, Point Chart.
    • The getSingleFieldVsTimeStamp function enables the following types: Bubble Chart, Bar Chart, Two Series Line Chart, Stacked Bar Chart, Heat Map, Cluster Bar, Stacked Line Chart.
    • The getFieldaVsFieldb function enables the following types: Bubble Chart, Bar Chart, Two Series Line Chart, Stacked Bar Chart, Heat Map, Cluster Bar, Stacked Line Chart.
    title You can specify a title of your choice.
    $ref Specifies the data reference.
    Depending on the functions that you add to OMNIbus_Static_Dashboard.py, the following data reference values are available:
    • The getSingleFieldCount function enables the following value: FieldNameCount
    • The getSingleFieldVsTimeStamp function enables the following value: FieldNameVsTime
    • The getFieldaVsFieldb function enables the following value: FieldNameAVsFieldNameB
    Where FieldName is case-sensitive and matches the event field name in the index configuration of your source type.
    parameters Specifies the yaxis, xaxis, and categories chart parameters.
    Depending on the functions that you add to OMNIbus_Static_Dashboard.py, the following chart parameter values are available:
    • The getSingleFieldCount function enables the following values: FieldName, count.
    • The getSingleFieldVsTimeStamp function enables the following values: FieldName, date, count.
    • The getFieldaVsFieldb function enables the following values: FieldNameA, FieldNameB, count.
    Where FieldName is case-sensitive and matches the event field name in the index configuration of your source type.

When you run the App, the new Node over AlertGroup chart is displayed in the event dashboard.