Creating a query monitoring rule
You can use the Amazon Redshift console to create and modify WLM query monitoring rules. Query monitoring rules are part of the WLM configuration parameter for a parameter group. If you modify a query monitoring rule (QMR), the change happens automatically without the need to modify the cluster. For more information, see WLM query monitoring rules.
When you create a rule, you define the rule name, one or more predicates, and an action.
When you save WLM configuration that includes a rule, you can view the JSON code for the rule definition as part of the JSON for the WLM configuration parameter.
To create a query monitoring rule
-
Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshiftv2/
. -
On the navigation menu, choose Configurations, then choose Workload management to display the Workload management page.
-
Choose the parameter group that you want to modify to display the details page with tabs for Parameters and Workload management.
-
Choose the Workload management tab, and choose Edit workload queues to edit the WLM configuration.
-
Add a new rule either by using a predefined template or from scratch.
To use a predefined template, do the following:
-
Choose Add rule from template in the Query monitoring rules group. The list of rule templates is displayed.
-
Choose one or more rule templates. When you choose Save, WLM creates one rule for each template that you choose.
-
Enter or confirm values for the rule, including Rule names, Predicates and Actions.
-
Choose Save.
To add a new rule from scratch, do the following:
-
To add additional predicates, choose Add predicate. You can have up to three predicates for each rule. If all of the predicates are met, WLM triggers the associated action.
-
Choose an Action. Each rule has one action.
-
Choose Save.
-
Amazon Redshift generates your WLM configuration parameter in JSON format and displays it in the JSON section.