Before you learn about configuring Application Alerts, quickly go over some key concepts.
Cron and Event Listener Alerts
Application Alerts associated with Catalyst Cron and Event Listeners work slightly differently compared to the alerts associated with Logs. With Cron and Event Listeners, you can configure alerts to be notified of the following specific events occurring in those components:
- Failure: Indicates the failure of a cron or an event listener execution, and the failure in triggering the associated cron or event function
- Code Exception: Indicates an exception occurring in an associated entity, that triggered the execution of an exception handler
- Timeout: Indicates a cron or an event listener attempting to execute until a timeout occurs
You can associate an alert to be notified of any or all of these conditions occurring in a single or multiple cron or event listener executions. For example, you can configure one alert to inform you of Failure, Code Exception, or Timeout occurring in five different crons configured in your project. Catalyst will listen for these events in all five crons, and collectively send you an alert for all such occurrences in the configured time window.
Application Alerts associated with Logs enable you to automate a log search by providing the search query. The query includes the log type: Access or Application logs, the functions whose logs you require to be searched, and a specific keyword to search for in the logs. If you select Application logs, you can also select one of the log levels to search from: Info, Error, Severe, or Warning. For Node.js functions, you can additionally select from two other levels: Uncaught Exception and Unhandled Rejection.
You can then set the criteria and the frequency of the alert. This enables Catalyst to automatically execute the log query search in the configured frequency, and fetch all results that match the criteria. Application Alerts will then send emails notifying the recipients of these results.
The criteria and the frequency that you can configure for an alert is the same for alerts associated with all three components.
Alert Criteria and Frequency
The criteria configuration allows you to specify the threshold of the failure events or log search results for an alert. If the results match the configured threshold, Catalyst will initiate the sending of the alert.
You can select one of the following comparators to set the criteria: greater than, lesser than, equals to, greater than, or equals to. You can then specify the threshold value numerically. For example, if you select the comparator as “greater than” and set the threshold as “5”, then Catalyst will alert you if the specified failure events or log search results exceed 5 instances.
The alert frequency enables you to specify how often you would like to receive emails for a configured alert. You can select a frequency based on a time interval, such as every 15 minutes, every 1 hour, or every 12 hours, or you can specify a particular time each day that you would like to receive the alert.
Cron and Event Listener Alerts:
Catalyst will fetch all instances matching the alert conditions and criteria in the configured frequency window and send emails each time. For example, assume you configure a cron alert in the following way:
- Alert Conditions: Failure, Timeout
- Criteria: Greater than or equal to 10
- Alert Frequency: Every 30 minutes
This will enable Catalyst to fetch failures and timeout events that occurred in the associated cron executions once every 30 minutes, starting from the time of the alert configuration. If the failures and timeout instances are collectively greater than or equal to 10 in the last 30 minute window, an alert will be triggered. If there are no failures or timeouts, or if their instances are fewer than 10, no alerts will be sent.
Catalyst will execute the log query search in the set frequency. For example, assume you configure a logs alert in the following way:
- Query: Application logs for an Advanced I/O function, Keyword - “server”, Log level- Warning
- Criteria: Greater than 5
- Alert Frequency: Every 1 hour
Catalyst will execute a logs search with this query once every hour. If there are more than 5 results containing the keyword “server” at the Warning level in the specified function’s execution in the last 1 hour window, Catalyst will send an alert.
Last Updated 2023-05-09 17:03:08 +0530 +0530
Send your feedback to us