+
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/alerting/opsgenie.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ To configure a **Rest HTTP API** integration in your Opsgenie account:
<img alt="Coroot Opsgenie Integration" src="/img/docs/opsgenie-integration.png" class="card w-800"/>
* You can also send a test alert to check the integration
<img alt="Coroot Opsgenie Test Alert" src="/img/docs/opsgenie-integration-test.png" class="card w-800"/>
* To overwrite Opsgenie URL, please use the ENV variable OPS_GENIE_API_URL
6 changes: 6 additions & 0 deletions notifications/opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
"os"
"strings"

"github.com/coroot/coroot/db"
Expand All @@ -27,6 +28,11 @@ func NewOpsgenie(apiKey string, euInstance bool) *Opsgenie {
if euInstance {
cfg.OpsGenieAPIURL = client.API_URL_EU
}

if envURL := os.Getenv("OPS_GENIE_API_URL"); envURL != "" {
cfg.OpsGenieAPIURL = client.ApiUrl(envURL)
}

c, _ := alert.NewClient(cfg)
return &Opsgenie{client: c}
}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载