A metric expression is the unique combination of dimensions and measures values which are sent to Anodot.
When building a metric expression you should perform the following steps:
- Search for the metrics you need to build your expression.
- Build an expression based on these metrics.
- Use the expression either by saving it to a dashboard, to create an alert, or as a composite metric for later use.
This section describes the above steps in more detail, and includes the following:
- Creating a Metric Expression
- Adding a Function Node
- Adding an Expression Root
- Copying and Pasting a Subtree
- Saving an Expression Metric to a Dashboard
- Saving an Expression to an Alert
- Saving an Expression as a Composite Metric - see Saving Composite Metrics
Creating a Metric Expression
- From the Navigation Panel, click Metric Search.
- Click in the search box to start the metrics definition dialog. Click at any time to clear all values from the box.
- The first prompt is for metric Properties. In the displayed dropdown list, select a property.
- You are then prompted to select Values for the selected property; in the Values dropdown list, select the relevant value.
As you continue to add filter/value pairs, the number of filter tokens is briefly shown at the end of the line on the right, for example, +2.
As you are building the expression, the number of metrics in the data meeting the criteria is shown at the end of the line. You can preview the metric results in the chart.
- To view the results of an expression or function in the chart, click in the node.
- Press the ENTER key to complete the expression.
Adding a Function Node
- In the expression node for the function, click the Function icon displayed above the expression node.
- In the function box, type the name of the function or select from the dropdown list. The function input line appears.
- If the function has mandatory parameters, select from the parameter dropdown list or enter a value on the input line.
- If the function has additional parameters, click the down arrow to open the dropdown list and select a parameter value.
- Continue until you have completed the expression tree for your metric.
- Press ENTER to complete the expression.
Adding an Expression Root
In Dashboard charts and meter tiles, you can add additional expression roots.
- Click +Expression. A new expression definition node is displayed.
- Complete the expression, as described in the sections above.
- Click Save.
Although the new expression tree is independent of the first tree, it displays in the same chart as the first tree, but with different scales.
To move nodes within the expression tree:
- In an expression or function node, hover over the left/right arrows to display the Move icon.
- Holding down the left mouse button, drag and drop the node.
Copying and Pasting a Subtree
Any subtree can be copied from the Expression Builder and then pasted to a metric expression used or created elsewhere in Dashboard tiles, alerts and composite metrics, as shown in the following procedure.
Note: If you copy the subtree and a warning message is displayed, fix it before saving. See Metric Functions.
- Navigate to a Metrics Expression panel from a Dashboard tile, metrics page, alert or composite metric.
- Select the subtree you want to copy.
- Click the Copy subtree icon.
A Copied to Clipboard message is displayed.
- Navigate to the Dashboard tile, Alert or Composite Metric expression panel where you want to paste the expression or root you copied in Step 3.
- Click Paste Subtree. The copied section is pasted as a new root.
Saving an Expression to a Dashboard
- Complete Creating a Metric Expression.
- Click Save > Save to Dashboard. The Save To Dashboard dialog is displayed.
- Either save to an Existing Dashboard (select from the Select Dashboard... dropdown menu)
or click New and type a unique name in the Dashboard name field.
- Enter a Tile Name.
- Enter a web link in the Link To box. This converts the tile name to a hyperlink to the specified link.[Optional]
- Click OK. The metric is saved to an existing or new Dashboard, depending on what you selected in Step 3.
Saving an Expression to an Alert
- Complete Creating a Metric Expression.
- Click Save > Create Alert.
- Option A:
If there is no composite function in the metric, the New Alert window is displayed, with the Metric Expression field filled in with the metric expression name.
- The Metrics Expression is the metric definition.
- The Info Name is the name of the Alert, as it appears in the All Alerts window.
See Alerts Overview for further details.
If the metric includes a composite definition, the Save Composite Definition dialog is displayed.
i. Enter a unique name in the Name field.
ii. Enter a name in the What are you measuring (what=) field. [Optional]
iii. In the Additional Properties section, select from the proposed additional common properties of the functions displayed and/or type a new property[ies] which are of specific interest to you. [Optional]
iv. Click OK to display the New Alert window.
See Composite Metrics for further details.