Graph

Syntax

Graph(<monitor-set>[, title=<title>][, dashboard_display=True])

Description

The Graph function enables you to select a monitor or group of monitors to display together in a graph on the Agent Details page in the Web UI.

Parameters

<monitor-set>

Specifies a comma-separated list of monitors to be included in this graph. The list must be enclosed in brackets ([]), which define a list in Python. The list must include at least one monitor.

Examples:

  • [self.monitor1]

  • [self.m1, self.m2, self.m3]

<title>

Specifies the title to be displayed for this graph. The definition of <title> must use the Title function.

For example: title=Title("My graph title")

dashboard_display=True

Specifies that this graph represent this agent on the Analytics Dashboard of the Web UI. You must specify this parameter for exactly one graph per agent.

If either of the following is true, a script error is generated:

  • The script has multiple Graph functions defined, but none of those Graph functions set the parameter dashboard_display=True.

  • The script has multiple Graph functions defined, and more than one of those Graph functions sets the parameter dashboard_display=True.

Usage

The Aruba Network Analytics Engine provides the Graph function to enable you to select a monitor or group of monitors to display together in a graph on the Agent Details page in the Web UI.

The Agent Details page can include up to nine graphs. If the script does not include a Graph function, a default graph is created automatically. The default graph includes all the monitors in the script. You use the dashboard_display=True parameter to specify which graph is to represent the agent in on the Analytics Dashboard of the Web UI.

Examples

In the following example, graph g1 includes data from monitors m1 and m2. The graph does not have a custom title and is not the graph that represents the agent in the Analytics Dashboard.

self.g1 = Graph([self.m1, self.m2])

In the following example, graph g2 includes data from monitor m1. The graph has a custom title, but it is not the graph that represents the agent in the Analytics Dashboard.

title = Title("CPU utilisation by {} daemon ", [self.params["daemon_name"]])
self.g2 = Graph([self.m1], title=title)

In the following example, graph g2 includes data from monitor m1. The graph has a custom title and it is the graph that represents the agent in the Analytics Dashboard.

title = Title("CPU utilisation by hpe-policyd daemon")
self.g2 = Graph([self.m1], title=title, dashboard_display=True)