Triggers
This documentation explains how to create triggers to alert you of specific logging behaviors.
You can read our Anomaly Detection documentation for more information on AppSignal's alerting functionality.
Creating Triggers
To create a new trigger, navigate to Triggers in the Logging Navigation, and click "Create a log trigger".
You will then be requested to define the following trigger attributes:
Name & Description
In the Create new trigger form, give your trigger a functional name and description, for example, "Slow Process Trigger".
Trigger Query
Logging triggers are query based, meaning an alert is triggered when the conditions of a logging query are met.
For example, if we have a logging attribute called duration
that records how long an API request takes to complete, and we want to be alerted when that attribute is greater than 50, we would create a trigger with the following query:
attributes.duration > 50
You can read more about AppSignal's query syntax in our Log Management documentation.
Threshold
You can define a threshold for your trigger to ensure you only receive alerts when necessary. Logging triggers can have the following thresholds:
- Every Occurrence
- First After Close
- Nth in an hour
- Nth in a day
If you want to prevent a trigger from notifying you, you can select "Never Notify". The Never Notify threshold is mainly used for benign issues you want to keep track of but are not urgent enough to justify triggering an alert.
You can read more about thresholds in our Notification Settings documentation.
Set Trigger Severity
Triggers can be scoped to the following severities:
- Critical
- High
- Low
- Info
If we select the Critical severity, our trigger will only be triggered when a critical severity log matches our query.
If you do not wish to scope your trigger on severity, you can choose "Not set", meaning the trigger will be triggered when its query is matched for any log severity.
Trigger Source
Define which logging sources your query applies to.
Trigger Notifier
Define how you are notified once a trigger is triggered, for example, via email or Slack.
Logging currently supports the following notifiers:
- Discord
- Google Hangouts
- Opsgenie
- Pagerduty
- Slack
- MS Teams
- Webhook
You can read more about integrating AppSignal with notifiers in our Integrations documentation.
Save & Manage Triggers
Once saved, if the conditions of your trigger are met, you will be alerted via your preferred notifier platform.
You can manage your logging triggers from the Triggers page.
If you are struggling with integrating a notifier or are not receiving alerts, you can reach out to us support, we're here to help!