ZhenyuePan opened a new issue, #11999:
URL: https://github.com/apache/inlong/issues/11999

   ### Description
   
   This PR introduces a new alert evaluation mechanism and periodic audit check 
task for the InLong Audit system. The main features include:
   # 1.Alert Evaluator:
   - Implements AlertEvaluator to evaluate audit metrics against alert rules
   - Compares source and sink metrics to detect anomalies based on configurable 
thresholds
   - Supports multiple comparison operators (>, >=, <, <=, ==, !=)
   - Reports alerts to Prometheus and logs when conditions are met
   # 2.​Periodic Audit Check Task:
   - Implements AuditCheckTask a scheduled background job
   - Periodically fetches audit metrics from storage
   - Evaluates all configured alert rules against the metrics
   - Configurable execution interval and time window parameters
   # 3.​Configuration Support:
   - Supports configurable parameters through AppConfig:
   - Execution interval time
   - Time window for metrics query
   - Source audit ID
   - Provides default values when configuration is missing
   # 4.​Error Handling:
   - Graceful handling of missing or invalid metrics
   - Proper shutdown procedure for the scheduled task
   - Logging for important operations and errors
   The implementation helps monitor data consistency between source and sink 
components, providing early warning when discrepancies exceed configured 
thresholds.
   
   ### Use case
   
   This PR introduces a new alert evaluation mechanism and periodic audit check 
task for the InLong Audit system. The main features include:
   # 1.Alert Evaluator:
   - Implements AlertEvaluator to evaluate audit metrics against alert rules
   - Compares source and sink metrics to detect anomalies based on configurable 
thresholds
   - Supports multiple comparison operators (>, >=, <, <=, ==, !=)
   - Reports alerts to Prometheus and logs when conditions are met
   # 2.​Periodic Audit Check Task:
   - Implements AuditCheckTask a scheduled background job
   - Periodically fetches audit metrics from storage
   - Evaluates all configured alert rules against the metrics
   - Configurable execution interval and time window parameters
   # 3.​Configuration Support:
   - Supports configurable parameters through AppConfig:
   - Execution interval time
   - Time window for metrics query
   - Source audit ID
   - Provides default values when configuration is missing
   # 4.​Error Handling:
   - Graceful handling of missing or invalid metrics
   - Proper shutdown procedure for the scheduled task
   - Logging for important operations and errors
   The implementation helps monitor data consistency between source and sink 
components, providing early warning when discrepancies exceed configured 
thresholds.
   
   ### Are you willing to submit PR?
   
   - [x] Yes, I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to