(New) Setting Filters for AOM Dashboards
Add filters to new AOM dashboards to filter statistical graphs based on specified conditions. Filters are used to modify query criteria for statistical graphs in new dashboards in batches. Each statistical graph is actually the results of a query and analysis statement.
AOM supports the following types of filters:
- Data source variable: You can switch data sources for dashboards. The graphs in dashboards can change with the data sources. (Filters of the data source variable type apply only for log data source graphs.)
- Custom variable: You can set static or dynamic variable values and use them in query statements for batch statement modification. In this way, you can filter statistical graphs based on custom variables.
- Log filter: You can enter a search statement or specify a drop-down option to filter log stream graph data in a dashboard. (Log filters apply only for log data source graphs.)
Constraints
Only in new dashboards can you set the preceding filters. New dashboards are not generally available. To use them, submit a service ticket.
Configuring a Filter of the Data Source Variable Type
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Dashboard > Dashboard. Click Try New Version in the upper right corner of the page.
- Click a dashboard to go to its details page.
- Click
in the upper right corner of the dashboard details page. The Dashboard Settings page is displayed.
- Click Create. On the page that is displayed, set parameters for the filter of the data source variable type.
Table 1 Parameter description Parameter
Description
Basic Info
Name
Name of a filter. Each name must be unique. Enter up to 255 characters and do not start or end with an underscore (_). Only digits, letters, and underscores are allowed.
Alias
(Optional) Alias of the filter. Enter up to 255 characters and do not start or end with an underscore (_) or hyphens (-). Only digits, letters, hyphens, and underscores are allowed. After the filter alias is set, it is displayed preferentially.
Description
(Optional) Description of the filter. Enter up to 1,000 characters.
Type
Type of the filter. Select Data source variable. You can switch the data sources of graphs in a dashboard.
Variable Value Settings
Type
Option: Log stream. That is, this setting is only available for the graphs that have been SQL-analyzed and visualized.
Log Group Name
Select the log group name of the default data source.
Log Stream Name
Select the log stream name of the default data source.
- Click Preview to preview your filter settings.
- Click OK to create a filter of the data source variable type.
The new filter is displayed on the dashboard details page and the page for adding a graph. You can click the filter and enter a criterion in the search box or select a criterion from the drop-down list to filter statistical graphs in a dashboard.
Configuring a Filter of the Custom Variable Type
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Dashboard > Dashboard. Click Try New Version in the upper right corner of the page.
- Click a dashboard to go to its details page.
- Click
in the upper right corner of the dashboard details page. The Dashboard Settings page is displayed.
- Click Create. On the page that is displayed, set parameters for the filter of the custom variable type.
- Configure a filter of the custom variable type by referring to the following table.
Table 2 Basic information Parameter
Description
Name
Name of a filter. Each name must be unique. Enter up to 255 characters and do not start or end with an underscore (_). Only digits, letters, and underscores are allowed.
Alias
(Optional) Alias of the filter. Enter up to 255 characters and do not start or end with an underscore (_) or hyphens (-). Only digits, letters, hyphens, and underscores are allowed. After the filter alias is set, it is displayed preferentially.
Description
(Optional) Description of the filter. Enter up to 1,000 characters.
Type
Type of the filter. Select Custom variable. You can set static or dynamic variable values and use them in query statements for batch statement modification.
- (Optional) Configure a static variable value for the filter of the custom variable type.
- Click Add Static Variable Value in the Static Variable Value area.
- Configure a static variable by referring to the following table.
Table 3 Static variable configuration Parameter
Description
Value
Field value of the static variable. Enter up to 255 characters and do not start or end with an underscore (_). Only digits, letters, and underscores are allowed.
Alias
(Optional) Alias of the field value of the static variable. Enter up to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. Do not start with a period or underscore or end with a period. After an alias is set, it will be displayed preferentially.
Default Value
Whether to use the value of the static variable as the default value. (If an alias has been set, the alias will be displayed preferentially.):
- Enable: The value of the static variable is automatically selected as the default value of the filter.
- Disable: The value of the static variable is not automatically selected as the default value of the filter.
To delete a static variable value, click Delete in the Operation column.
- (Optional) Configure a dynamic variable value for the filter of the custom variable type.
- Toggle on Dynamic Variable Value.
- Configure the source of the dynamic variable value:
- Prometheus instance: Query dynamic variable values from a Prometheus instance.
- Log stream: Query dynamic variable values from a log stream.
- Configure dynamic variable parameters.
- When Dynamic Variable Value Source is set to Prometheus instance, set parameters by referring to the following table.
Table 4 Dynamic variable configuration (source: Prometheus instance) Parameter
Description
Prometheus instance
Prometheus instance from which dynamic variable values are queried. By default, the Prometheus instance selected in the upper left corner after you access the dashboard details page is used. This parameter is grayed here and cannot be selected.
To change the Prometheus instance, select another Prometheus instance on the dashboard details page.
Query Method
Option: Metric field match.
Metric Name
Select a metric under the selected Prometheus instance.
Variable Display Field
Select a field of the metric to display. The values corresponding to this field will be displayed in the dashboard filter drop-down list.
Example: If this parameter is set to Cluster Name, specific cluster names will be displayed in the dashboard filter drop-down list.
Variable Value Field
Select an actual field for filtering.
For example, if Variable Display Field is set to Cluster Name and Variable Value Field is set to Cluster ID, when you select a cluster name from the dashboard filter drop-down list, the actual cluster ID will be used as the criterion for filtering.
Filter Criteria
Configure a dimension name and value. The = and != operators are supported.
You can click
to use AND to set multiple filter criteria for the same metric.
Sort By
Configure how the options will be displayed in the dashboard filter drop-down list. Option: None.
- If Dynamic Variable Source is set to Log stream, set parameters by referring to the following table.
Table 5 Dynamic variable configuration (source: log stream) Parameter
Description
Log Group
Select the log group of the dynamic variable source.
Log Stream
Select the log stream of the dynamic variable source. If no structuring rule has been configured, configure structuring first.
Query Method
Options: Fuzzy match and SQL query.
Field
If Query Method is set to Fuzzy match, select a structured field configured in the current log stream.
SQL query
If Query Method is set to SQL query, enter an SQL statement and click Query to preview the dynamic variable values. Only the SQL query of the pipe character version is supported. The default syntax is * | select *.
- When Dynamic Variable Value Source is set to Prometheus instance, set parameters by referring to the following table.
- Configure other information about the filter of the custom variable type.
- Default Value: Configure the default value of the filter. You can select the static or dynamic variable values configured in 2 or 3.
- Multi-Option Allowed: Whether multiple options can be selected for the filter. This function is enabled by default. After this function is enabled, multiple options are selectable for the filter.
- Include "Select All": Whether the Select All option is available in the drop-down list. This function is enabled by default. After this function is enabled, the Select All option is selectable.
- Click Preview to preview your filter settings.
- Configure a filter of the custom variable type by referring to the following table.
- Click OK to create a filter of the custom variable type.
The new filter is displayed on the dashboard details page and the page for adding a graph. You can click the filter and enter a criterion in the search box or select a criterion from the drop-down list to filter statistical graphs in a dashboard.
Configuring a Log Filter
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Dashboard > Dashboard. Click Try New Version in the upper right corner of the page.
- Click a dashboard to go to its details page.
- Click
in the upper right corner of the dashboard details page. The Dashboard Settings page is displayed.
- Click Create. On the page that is displayed, set parameters for a log filter.
- Configure a log filter by referring to the following table.
Table 6 Basic information Parameter
Description
Name
Name of a filter. Each name must be unique. Enter up to 255 characters and do not start or end with an underscore (_). Only digits, letters, and underscores are allowed.
Alias
(Optional) Alias of the filter. Enter up to 255 characters and do not start or end with an underscore (_) or hyphens (-). Only digits, letters, hyphens, and underscores are allowed. After the filter alias is set, it is displayed preferentially.
Description
(Optional) Description of the filter. Enter up to 1,000 characters.
Type
Type of the filter. Select Log filter. Enter a search statement or select a value from the drop-down list to filter log stream graph data in a dashboard.
- Configure filter information.
- If Filter Type is set to Search statement, set parameters by referring to the following table.
Table 7 Log filter configuration (filter type: search statement) Parameter
Description
Drop-down Option Data Source
Options:
- Log stream: The drop-down option data comes from a specified log stream.
- Data source variable: The drop-down option data comes from the filter of the data source variable type.
Log Group Name
When Drop-down Option Data Source is set to Log stream, select a desired log group.
Log Stream Name
When Drop-down Option Data Source is set to Log stream, select a desired log stream. If no structuring rule has been configured, configure structuring first.
Data source variable
When Drop-down Option Data Source is set to Data source variable, select a configured filter of the data source variable type from the Data source variable drop-down list.
Input Mode
Options:
- Interaction: You can select different fields from the filter and configure their association relationships for combined query.
Field association relationships: Include (Exact), Include (Fuzzy), Include (Phrase), Exclude (Exact), Exclude (Fuzzy), Exclude (Phrase), Field Exists, and Field Does Not Exist.
Combination modes: AND (default) and OR.
- Statement: You can directly enter a query statement to query.
Default Filter
Configure the default filter in interaction or statement mode. This parameter needs to be set when Drop-down Option Data Source is set to Log stream.
- If Filter Type is set to Drop-down option, set parameters by referring to the following table.
Table 8 Log filter configuration (filter type: drop-down option) Parameter
Description
Drop-down Option Data Source
Options:
- Log stream: The drop-down option data comes from a specified log stream.
- Data source variable: The drop-down option data comes from the filter of the data source variable type.
Log Group
When Drop-down Option Data Source is set to Log stream, select a desired log group.
Log Stream
When Drop-down Option Data Source is set to Log stream, select a desired log stream. If no structuring rule has been configured, configure structuring first.
Filter Field
Select a log stream field to filter. If no index has been configured for the specified filter field, set indexes first. Otherwise, the field cannot be used for filtering.
Static Option
Click Add Static Variable Value to configure static variable information:
- Value: Field value of the static variable. Enter up to 255 characters.
- (Optional) Alias: Alias of the field value of the static variable. Enter up to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. Do not start with a period or underscore or end with a period. After an alias is set, it will be displayed preferentially.
- Default Value: Whether to use the value of the static variable as the default value. (If an alias has been set, the alias will be displayed preferentially.):
- Enable: The value of the static variable is automatically selected as the default value of the filter.
- Disable: The value of the static variable is not automatically selected as the default value of the filter.
Dynamic Option
Enable Dynamic Option and configure dynamic variable information:
- Query Method: Select Fuzzy match or SQL query.
- If Query Method is set to SQL query, enter an SQL statement and click Query to preview the dynamic variable values. Only the SQL query of the pipe character version is supported. The default syntax is * | select *.
Default Value
Configure the default value of the filter. You can select the configured static or dynamic variable values.
Multi-Option Allowed
Whether multiple options are selectable for the filter. This function is enabled by default. After this function is enabled, multiple options are selectable for the filter.
- If Filter Type is set to Search statement, set parameters by referring to the following table.
- Configure a log filter by referring to the following table.
- Click OK to create a log filter.
The new filter is displayed on the dashboard details page and the page for adding a graph. You can click the filter and enter a criterion in the search box or select a criterion from the drop-down list to filter statistical graphs in a dashboard.
More Operations
After a filter is created, perform the operations listed in Table 9 on the Dashboard Settings page if needed.
Parameter |
Description |
---|---|
Searching for a filter |
Search for filters by name, alias, type, or description. Enter or select a keyword in the search box above the filter list and click |
Editing a filter |
Click Modify in the Operation column that contains the target filter. |
Deleting a filter |
Click Delete in the Operation column that contains the target filter. In the dialog box that is displayed, click Yes. |
Using a filter to fill in a dashboard graph title |
After a filter is added, use ${Filter name} to dynamically fill in a dashboard graph title. (If an alias has been configured for the filter, it will be used preferentially.) The graph title can then be dynamically displayed based on the filter drop-down list values. For example, if the original graph name is Dashboard and the new filter is ClusterName, you can set the dashboard graph name to ${ClusterName} Dashboard. Then, select values from the drop-down list of ClusterName. These values will be dynamically combined with the original dashboard graph name for display. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot