Creating a SQL Inspection Rule
Scenario
You can create SQL inspection rules for specified SQL queues on the SQL Inspector page. The system will prompt, block, or perform circuit breaking on SQL requests that trigger the rules.
When creating or modifying a SQL inspection rule, evaluate the appropriateness of enabling the rules and setting the threshold based on the service scenario. This will help avoid the negative impact of unreasonable inspection rules blocking or performing circuit breaking on relevant SQL requests on the services.
Notes and Constraints
Procedure
- Log in to the DLI management console.
- In the navigation pane on the left, choose Global Configuration > SQL Inspector.
- On the displayed SQL Inspector page, click Create Rule in the upper right corner. In the Create Rule dialog box, set parameters based on the table below.
Table 1 Parameters for creating a SQL inspection rule Parameter
Description
Rule Name
Name of a SQL inspection rule
System Rules
Select an inspection rule. For details about the system inspection rules supported by DLI, see Creating a SQL Inspection Rule.
Queues
Select the queues the rules are bound to.
Description
Enter a rule description.
Rule Action
Actions that the current SQL inspection rule supports.
SQL rules support the following types of actions:
- Info: Record logs and provide a hint for handling the SQL request. If the rule has parameters, you need to configure the threshold.
- Block: Intercept the SQL request that meets the rule. If the rule has parameters, you need to configure the threshold.
- Circuit Breaker: Perform circuit breaking on the SQL request that meets the inspection rules. If the rule has parameters, you need to configure the threshold.
- Click OK.
View the added inspection rule on the SQL Inspector page. The rule takes effect dynamically.
To modify a rule, click Modify in its Operation column.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.