Dashboards
Dashboards are sets of widgets: charts, text blocks, and titles. Metrics on dashboard charts are displayed for a specific interval that is shared by all charts.
The default interval is one day. The interval can be set using preset ranges (1h 3h 1d 1w 1mo
). You can also set the beginning and the end interval.
To set the time interval more precisely, you can use the timeline located above the dashboard.
Yandex.Cloud users can use service dashboards that contain preset widgets with metrics on the status of cloud resources. Service dashboards are created automatically.
Dashboard parameters
Parameters let you create interactive dashboards whose content changes depending on the user's choice. For example, a dashboard that shows aggregated information about the status of a VM can be parameterized using the VM ID.
Parameters are displayed as drop-down menus above dashboard widgets. When you select a parameter value, the dashboard is updated and the selected value is substituted in data queries.
The following types of dashboards are available:
- Label value — The parameter takes a set of values of the specified label.
- Set of values — The parameter takes a set of fixed comma-separated values.
- Text field — The parameter takes the only value specified in the text field.
For parameters of the Label value and Set of values type, the Multiple choice setting is available. It lets you select multiple parameter values at the same time.
For all parameter types, you can set the Default value that will be used when loading a dashboard in the Yandex Monitoring web interface.
Creating a new dashboard parameter looks like this:
Parameter substitution
Dashboard parameter values are used in widget headings and queries to metrics to filter label values. Parameter values are substituted using mustache templates.
Note
You can only use parameter value substitution in label values when making queries to metrics.
Examples of parameter value substitution
-
Substituting values in widget headings.
In the
CPU usage on {{host}}
widget heading, thehost
parameter value is substituted. -
Substituting label values in queries.
In the
"cpu.iowait"{folderId="aoe6mk1r3b47lu994prn", service="{{myparm}}", host="*"}
query, theservice
label value is substituted with themyparm
parameter value.
Substituting parameter values in query strings looks like this:
Label value filter
The label value filter lets you limit the list of possible parameter values with the Label value type. The filter specifies labels and their values. The filter is applied to all parameters of the Label value type at the same time.
Examples of filtering label values
Let's say a dashboard has a Label value type parameter set for the cluster
label that takes the prod
, preprod-1
, preprod-2
, and testing
values.
Filtering settings and result:
- The
cluster=*prod*
filter limits parameter values to the list ofprod
andpreprod-1
values. - The
cluster=preprod-1|preprod-2
filter limits the values with the list ofpreprod-1
andpreprod-2
. - The
cluster=testing
filter limits the values to a singletesting
value.
Below is a more complex example. Let's say the system has the following metrics:
usage{cluster="prod", account="prodaccount"}
.usage{cluster="preprod", account="preprodaccount"}
.usage{cluster="testing", account="testingaccount"}
.usage{cluster="prod", account="multiaccount"}
.usage={cluster="testing", account="multiaccount"}
.
Filtering settings:
- The filter contains the
cluster=*prod*
value. - A dashboard has Label value type parameters set for the
cluster
andaccount
labels.
Result:
- Possible values of the
cluster
parameter are limited toprod
andpreprod
. Thetesting
value is excluded as not matching thecluster=*prod*
rule. - Possible values of the
account
parameter will be limited toprodaccount
,preprodaccount
, andmultiaccount
. Thetestingaccount
value is excluded as there is no metric with a combination ofaccount="testingaccount"
andcluster
labels matching thecluster=*prod*
rule (while this combination exists formultiaccount
).