Counting Log Keywords
Scenario
When an application is normal, its log file contains fewer than 10 error keywords every 10 minutes. However, when the application becomes abnormal, the number of error keywords increases rapidly. To identify an exception in a timely manner, you can use AOM to count the number of errors in logs and set threshold rules.
Procedure
- Log in to the AOM console. In the navigation pane, choose Log > Statistical Rules and click Create Statistical Rule.
- Create a statistical rule for the log bucket and set the keyword error.
- Create a threshold rule for the statistical rule and set the trigger condition as follows: if the number of errors is greater than 12 within 5 minutes, an alarm will be reported.
- After the threshold rule is created, if the statistical result exceeds the threshold, a Short Message Service (SMS) message or email will be sent immediately, informing you that the threshold has been exceeded and your service may be abnormal. The fault can then be located and rectified at the earliest time.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.