Example customization: OMNIbus Static Dashboard
The following examples show you how to customize the OMNIbus Static Dashboard app.
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:
- 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.
- 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');
- 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
FieldName
is case-sensitive and matches the event field name in the index configuration of your source type.parameters
Specifies the yaxis
,xaxis
, andcategories
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
.
FieldName
is case-sensitive and matches the event field name in the index configuration of your source type. - The
When you run the App, the new Node over AlertGroup chart is displayed in the event dashboard.