mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-12-24 12:14:23 +08:00
Add doc for opsgenie notify plugin #6600
30
notify.md
30
notify.md
@@ -734,3 +734,33 @@ export NTFY_TOKEN="xxxxxxxxxxxxx"
|
||||
|
||||
acme.sh --set-notify --notify-hook ntfy
|
||||
```
|
||||
|
||||
## 26. Set notification for OpsGenie
|
||||
|
||||
Create the API integration in OpsGenie ([Create an API integration | Opsgenie | Atlassian Support](https://support.atlassian.com/opsgenie/docs/create-a-default-api-integration/)) to get your API key. Set it as an environment variable:
|
||||
|
||||
```sh
|
||||
export OPSGENIE_API_KEY="xxxxxxxx"
|
||||
```
|
||||
|
||||
If your using the EU instance of OpsGenie, make sure to set the region variable to "EU" (default is "US"):
|
||||
|
||||
```sh
|
||||
export OPSGENIE_REGION="EU"
|
||||
```
|
||||
|
||||
Optionally set the OpsGenie priority used in the notifications depending on the acme.sh return code (0: success, 1: error, 2: skip). Available values are "P1" through "P5" ("P1" being the highest):
|
||||
|
||||
```sh
|
||||
export OPSGENIE_PRIORITY_SUCCESS=""
|
||||
export OPSGENIE_PRIORITY_ERROR=""
|
||||
export OPSGENIE_PRIORITY_SKIP=""
|
||||
```
|
||||
|
||||
After configuration is done, set the notification hook:
|
||||
|
||||
```sh
|
||||
acme.sh --set-notify --notify-hook opsgenie
|
||||
```
|
||||
|
||||
The configuration will be saved in ~/.acme.sh/account.conf and will be reused when needed.
|
||||
|
||||
Reference in New Issue
Block a user