Alerting: Support custom API URL for PagerDuty integration (#88007)

* fix assert in LINE
* fix pagerduty asserts

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
Gaurav Agrawal
2024-05-23 01:01:55 +05:30
committed by GitHub
parent c706166a24
commit fdaa091a4d
5 changed files with 21 additions and 10 deletions

View File

@@ -135,6 +135,7 @@ type PagerdutyIntegration struct {
Client *string `json:"client,omitempty" yaml:"client,omitempty" hcl:"client"`
ClientURL *string `json:"client_url,omitempty" yaml:"client_url,omitempty" hcl:"client_url"`
Details *map[string]string `json:"details,omitempty" yaml:"details,omitempty" hcl:"details"`
URL *string `json:"url,omitempty" yaml:"url,omitempty" hcl:"url"`
}
type PushoverIntegration struct {

View File

@@ -6,6 +6,7 @@ import (
"strings"
alertingOpsgenie "github.com/grafana/alerting/receivers/opsgenie"
alertingPagerduty "github.com/grafana/alerting/receivers/pagerduty"
alertingTemplates "github.com/grafana/alerting/templates"
)
@@ -363,6 +364,14 @@ func GetAvailableNotifiers() []*NotifierPlugin {
InputType: InputTypeText,
PropertyName: "details",
},
{ //New in 11.1
Label: "URL",
Description: "The URL to send API requests to",
Element: ElementTypeInput,
InputType: InputTypeText,
Placeholder: alertingPagerduty.DefaultURL,
PropertyName: "url",
},
},
},
{