docs/pagerduty-integration-guide.md
pagerduty will trigger a new incident on the corresponding PagerDuty service when the alert's defined failure-threshold has been reached.success-threshold, the previously triggered incident will be automatically resolved.If you need help with this integration, please create an issue at https://github.com/TwiN/gatus/issues
gatus-service-name (e.g. Gatus-Shopping-Cart) and select Gatus from the Integration Type menu.In your configuration file, you must first specify the integration key at alerting.pagerduty.integration-key, like so:
alerting:
pagerduty:
integration-key: "********************************"
You can now add alerts of type pagerduty in the endpoint you've defined, like so:
endpoints:
- name: website
interval: 30s
url: "https://twin.sh/health"
alerts:
- type: pagerduty
enabled: true
failure-threshold: 3
success-threshold: 5
description: "healthcheck failed 3 times in a row"
send-on-resolved: true
conditions:
- "[STATUS] == 200"
- "[BODY].status == UP"
- "[RESPONSE_TIME] < 300"
The sample above will do the following:
https://twin.sh/health (endpoints[].url) specified every 30s (endpoints[].interval)endpoints[].alerts[].failure-threshold) times in a row: Gatus will create a new incidentendpoints[].alerts[].success-threshold) times in a row AND endpoints[].alerts[].send-on-resolved is set to true: Gatus will resolve the triggered incidentIt is highly recommended to set endpoints[].alerts[].send-on-resolved to true for alerts of type pagerduty.
While the above will prevent incidents from being created, you are also highly encouraged to disable the alerts in your Gatus configuration files or simply remove the integration key from the configuration file.