From 7c54cbc43cc980e6e1d37ac5cc9412e7e654cc33 Mon Sep 17 00:00:00 2001 From: Gnani Rahul Nutakki Date: Thu, 23 Jul 2026 21:48:06 -0500 Subject: [PATCH 1/2] victorops: use Splunk On-Call branding Update user-facing documentation, source comments, and validation errors to use the current product name while preserving the existing VictorOps configuration and telemetry surface. Signed-off-by: Gnani Rahul Nutakki --- CHANGELOG.md | 2 ++ config/config.go | 4 ++-- config/config_test.go | 4 ++-- config/notifiers.go | 9 +++++---- config/notifiers_test.go | 4 ++-- docs/configuration.md | 15 +++++++++------ docs/integrations.md | 2 +- notify/victorops/victorops.go | 9 +++++---- 8 files changed, 28 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5182671a2..44dfbc3f55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## main / (unreleased) +* [ENHANCEMENT] victorops: Use Splunk On-Call branding in user-facing documentation and errors while preserving existing configuration names. #3539 + ## 0.34.0 / 2026-08-16 * [CHANGE] notify: The `reason` label on `alertmanager_notifications_failed_total` now distinguishes `authError` (HTTP 401/403) and `rateLimited` (HTTP 429) from the generic `clientError`. Dashboards/alerts matching `reason="clientError"` for these codes must be updated. #5332 diff --git a/config/config.go b/config/config.go index 487ec83e4a..f736b75993 100644 --- a/config/config.go +++ b/config/config.go @@ -537,14 +537,14 @@ func (c *Config) UnmarshalYAML(unmarshal func(any) error) error { voc.HTTPConfig = cmp.Or(voc.HTTPConfig, c.Global.HTTPConfig) voc.APIURL = cmp.Or(voc.APIURL, c.Global.VictorOpsAPIURL) if voc.APIURL == nil { - return errors.New("no global VictorOps URL set") + return errors.New("no global Splunk On-Call URL set") } if !strings.HasSuffix(voc.APIURL.Path, "/") { voc.APIURL.Path += "/" } if voc.APIKey == "" && len(voc.APIKeyFile) == 0 { if c.Global.VictorOpsAPIKey == "" && len(c.Global.VictorOpsAPIKeyFile) == 0 { - return errors.New("no global VictorOps API Key set") + return errors.New("no global Splunk On-Call API key set") } voc.APIKey = c.Global.VictorOpsAPIKey voc.APIKeyFile = c.Global.VictorOpsAPIKeyFile diff --git a/config/config_test.go b/config/config_test.go index 8eb1536337..f3c01f7422 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -1123,8 +1123,8 @@ func TestVictorOpsNoAPIKey(t *testing.T) { if err == nil { t.Fatalf("Expected an error parsing %s: %s", "testdata/conf.victorops-no-apikey.yml", err) } - if err.Error() != "no global VictorOps API Key set" { - t.Errorf("Expected: %s\nGot: %s", "no global VictorOps API Key set", err.Error()) + if err.Error() != "no global Splunk On-Call API key set" { + t.Errorf("Expected: %s\nGot: %s", "no global Splunk On-Call API key set", err.Error()) } } diff --git a/config/notifiers.go b/config/notifiers.go index 0c0c21b62d..d3a0b42e3b 100644 --- a/config/notifiers.go +++ b/config/notifiers.go @@ -78,7 +78,7 @@ var ( AgentID: `{{ template "wechat.default.agent_id" . }}`, } - // DefaultVictorOpsConfig defines default values for VictorOps configurations. + // DefaultVictorOpsConfig defines default values for Splunk On-Call configurations. DefaultVictorOpsConfig = VictorOpsConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, @@ -388,7 +388,8 @@ func (c *WechatConfig) UnmarshalYAML(unmarshal func(any) error) error { return nil } -// VictorOpsConfig configures notifications via VictorOps. +// VictorOpsConfig configures notifications through Splunk On-Call. +// The type name is retained for configuration compatibility. type VictorOpsConfig struct { amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"` @@ -413,7 +414,7 @@ func (c *VictorOpsConfig) UnmarshalYAML(unmarshal func(any) error) error { return err } if c.RoutingKey == "" { - return errors.New("missing Routing key in VictorOps config") + return errors.New("missing routing key in Splunk On-Call config") } if c.APIKey != "" && len(c.APIKeyFile) > 0 { return errors.New("at most one of api_key & api_key_file must be configured") @@ -423,7 +424,7 @@ func (c *VictorOpsConfig) UnmarshalYAML(unmarshal func(any) error) error { for _, v := range reservedFields { if _, ok := c.CustomFields[v]; ok { - return fmt.Errorf("victorOps config contains custom field %s which cannot be used as it conflicts with the fixed/static fields", v) + return fmt.Errorf("custom field %s cannot be used in Splunk On-Call config because it conflicts with the fixed/static fields", v) } } diff --git a/config/notifiers_test.go b/config/notifiers_test.go index 0ab362dc00..a61034d08d 100644 --- a/config/notifiers_test.go +++ b/config/notifiers_test.go @@ -121,7 +121,7 @@ routing_key: '' var cfg VictorOpsConfig err := yaml.UnmarshalStrict([]byte(in), &cfg) - expected := "missing Routing key in VictorOps config" + expected := "missing routing key in Splunk On-Call config" if err == nil { t.Fatalf("no error returned, expected:\n%v", expected) @@ -160,7 +160,7 @@ custom_fields: var cfg VictorOpsConfig err := yaml.UnmarshalStrict([]byte(in), &cfg) - expected := "victorOps config contains custom field entity_state which cannot be used as it conflicts with the fixed/static fields" + expected := "custom field entity_state cannot be used in Splunk On-Call config because it conflicts with the fixed/static fields" if err == nil { t.Fatalf("no error returned, expected:\n%v", expected) diff --git a/docs/configuration.md b/docs/configuration.md index 92cf0e04d8..47ae258a1b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -110,10 +110,10 @@ global: [ slack_app_token_file: ] [ slack_app_url: ] - # The default API key to use when talking to the VictorOps API. + # The default API key to use when talking to the Splunk On-Call API. # It is mutually exclusive with `victorops_api_key_file`. [ victorops_api_key: ] - # Reads the default API key to use when talking to the VictorOps API from a file. + # Reads the default API key to use when talking to the Splunk On-Call API from a file. # It is mutually exclusive with `victorops_api_key`. [ victorops_api_key_file: ] [ victorops_api_url: | default = "https://alert.victorops.com/integrations/generic/20131114/alert/" ] @@ -1904,21 +1904,24 @@ attributes: ### `` -VictorOps notifications are sent out via the [VictorOps API](https://help.victorops.com/knowledge-base/rest-endpoint-integration-guide/) +Splunk On-Call (formerly VictorOps) notifications are sent through the +[Splunk On-Call REST endpoint integration](https://help.splunk.com/en/splunk-enterprise/alert-and-respond/splunk-on-call/integrations-with-splunk-on-call/rest-endpoint-integration-for-splunk-on-call). +The `victorops_config` name and related `victorops_*` global fields are retained +for backward compatibility. ```yaml # Whether to notify about resolved alerts. [ send_resolved: | default = true ] -# The API key to use when talking to the VictorOps API. +# The API key to use when talking to the Splunk On-Call API. # It is mutually exclusive with `api_key_file`. [ api_key: | default = global.victorops_api_key ] -# Reads the API key to use when talking to the VictorOps API from a file. +# Reads the API key to use when talking to the Splunk On-Call API from a file. # It is mutually exclusive with `api_key`. [ api_key_file: | default = global.victorops_api_key_file ] -# The VictorOps API URL. +# The Splunk On-Call API URL. [ api_url: | default = global.victorops_api_url ] # A key used to map the alert to a team. diff --git a/docs/integrations.md b/docs/integrations.md index 3bd96fcd02..408af6d2e9 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -23,7 +23,7 @@ Alertmanager supports a number of notification integrations via the [configurati | [Rocket.Chat](https://rocket.chat/) | [rocketchat_config](configuration.md#rocketchat_config) | [Personal Access Tokens](https://docs.rocket.chat/use-rocket.chat/user-guides/user-panel/my-account#personal-access-tokens) | [Rocket.Chat REST API](https://developer.rocket.chat/reference/api/rest-api/endpoints/messaging/chat-endpoints/postmessage) | | [Slack](https://slack.com/) | [slack_config](configuration.md#slack_config) | [Incoming Webhooks](https://api.slack.com/messaging/webhooks) / [Bot Tokens](https://api.slack.com/authentication/token-types) | [Slack API](https://api.slack.com/methods/chat.postMessage) | | [Telegram](https://telegram.org/) | [telegram_config](configuration.md#telegram_config) | [Telegram Bots](https://core.telegram.org/bots) | [Telegram Bot API](https://core.telegram.org/bots/api) | -| [VictorOps](https://victorops.com/) | [victorops_config](configuration.md#victorops_config) | [REST Endpoint Integration Guide](https://help.victorops.com/knowledge-base/rest-endpoint-integration-guide/) | [VictorOps REST API](https://help.victorops.com/knowledge-base/rest-endpoint-integration-guide/) | +| [Splunk On-Call](https://help.splunk.com/en/splunk-enterprise/alert-and-respond/splunk-on-call/introduction-to-splunk-on-call/getting-started-guide-for-splunk-on-call-admins) (formerly VictorOps) | [victorops_config](configuration.md#victorops_config) | [REST Endpoint Integration Guide](https://help.splunk.com/en/splunk-enterprise/alert-and-respond/splunk-on-call/integrations-with-splunk-on-call/rest-endpoint-integration-for-splunk-on-call) | [REST Endpoint Reference](https://help.splunk.com/en/splunk-enterprise/alert-and-respond/splunk-on-call/integrations-with-splunk-on-call/rest-endpoint-integration-for-splunk-on-call) | | [Webex](https://www.webex.com/) | [webex_config](configuration.md#webex_config) | [Webex for Developers](https://developer.webex.com/) | [Webex Messages API](https://developer.webex.com/docs/api/v1/messages) | | [Webhook](https://en.wikipedia.org/wiki/Webhook) | [webhook_config](configuration.md#webhook_config) | [Webhook Integrations](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) | - | | [WeChat](https://www.wechat.com/) | [wechat_config](configuration.md#wechat_config) | [WeChat Work Documentation](https://developers.weixin.qq.com/doc/offiaccount/en/Message_Management/Service_Center_messages.html) | [WeChat Work API](https://developers.weixin.qq.com/doc/offiaccount/en/Message_Management/Service_Center_messages.html) | diff --git a/notify/victorops/victorops.go b/notify/victorops/victorops.go index 746a10b55d..d3113c9cba 100644 --- a/notify/victorops/victorops.go +++ b/notify/victorops/victorops.go @@ -32,10 +32,11 @@ import ( "github.com/prometheus/alertmanager/types" ) -// https://help.victorops.com/knowledge-base/incident-fields-glossary/ - 20480 characters. +// The Splunk On-Call incident fields glossary documents a 20480-character limit. +// https://help.splunk.com/en/splunk-enterprise/alert-and-respond/splunk-on-call/alerts/incident-fields-glossary const maxMessageLenRunes = 20480 -// Notifier implements a Notifier for VictorOps notifications. +// Notifier implements a Notifier for Splunk On-Call notifications. type Notifier struct { conf *config.VictorOpsConfig tmpl *template.Template @@ -44,7 +45,7 @@ type Notifier struct { retrier *notify.Retrier } -// New returns a new VictorOps notifier. +// New returns a new Splunk On-Call notifier. func New(c *config.VictorOpsConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { client, err := notify.NewClientWithTracing(*c.HTTPConfig, "victorops", httpOpts...) if err != nil { @@ -109,7 +110,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return shouldRetry, err } -// Create the JSON payload to be sent to the VictorOps API. +// createVictorOpsPayload creates the JSON payload sent to the Splunk On-Call API. func (n *Notifier) createVictorOpsPayload(ctx context.Context, as ...*types.Alert) (*bytes.Buffer, error) { victorOpsAllowedEvents := map[string]bool{ "INFO": true, From 8a859d71f261e8a263d0804b61665b4df9f14fc1 Mon Sep 17 00:00:00 2001 From: Gnani Rahul Nutakki Date: Tue, 25 Aug 2026 09:47:16 -0500 Subject: [PATCH 2/2] docs: preserve VictorOps compatibility identifiers Signed-off-by: Gnani Rahul Nutakki --- CHANGELOG.md | 2 -- config/config.go | 4 ++-- config/config_test.go | 4 ++-- config/notifiers.go | 4 ++-- config/notifiers_test.go | 4 ++-- docs/configuration.md | 3 ++- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44dfbc3f55..a5182671a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,5 @@ ## main / (unreleased) -* [ENHANCEMENT] victorops: Use Splunk On-Call branding in user-facing documentation and errors while preserving existing configuration names. #3539 - ## 0.34.0 / 2026-08-16 * [CHANGE] notify: The `reason` label on `alertmanager_notifications_failed_total` now distinguishes `authError` (HTTP 401/403) and `rateLimited` (HTTP 429) from the generic `clientError`. Dashboards/alerts matching `reason="clientError"` for these codes must be updated. #5332 diff --git a/config/config.go b/config/config.go index f736b75993..487ec83e4a 100644 --- a/config/config.go +++ b/config/config.go @@ -537,14 +537,14 @@ func (c *Config) UnmarshalYAML(unmarshal func(any) error) error { voc.HTTPConfig = cmp.Or(voc.HTTPConfig, c.Global.HTTPConfig) voc.APIURL = cmp.Or(voc.APIURL, c.Global.VictorOpsAPIURL) if voc.APIURL == nil { - return errors.New("no global Splunk On-Call URL set") + return errors.New("no global VictorOps URL set") } if !strings.HasSuffix(voc.APIURL.Path, "/") { voc.APIURL.Path += "/" } if voc.APIKey == "" && len(voc.APIKeyFile) == 0 { if c.Global.VictorOpsAPIKey == "" && len(c.Global.VictorOpsAPIKeyFile) == 0 { - return errors.New("no global Splunk On-Call API key set") + return errors.New("no global VictorOps API Key set") } voc.APIKey = c.Global.VictorOpsAPIKey voc.APIKeyFile = c.Global.VictorOpsAPIKeyFile diff --git a/config/config_test.go b/config/config_test.go index f3c01f7422..8eb1536337 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -1123,8 +1123,8 @@ func TestVictorOpsNoAPIKey(t *testing.T) { if err == nil { t.Fatalf("Expected an error parsing %s: %s", "testdata/conf.victorops-no-apikey.yml", err) } - if err.Error() != "no global Splunk On-Call API key set" { - t.Errorf("Expected: %s\nGot: %s", "no global Splunk On-Call API key set", err.Error()) + if err.Error() != "no global VictorOps API Key set" { + t.Errorf("Expected: %s\nGot: %s", "no global VictorOps API Key set", err.Error()) } } diff --git a/config/notifiers.go b/config/notifiers.go index d3a0b42e3b..dd2d5dba5d 100644 --- a/config/notifiers.go +++ b/config/notifiers.go @@ -414,7 +414,7 @@ func (c *VictorOpsConfig) UnmarshalYAML(unmarshal func(any) error) error { return err } if c.RoutingKey == "" { - return errors.New("missing routing key in Splunk On-Call config") + return errors.New("missing Routing key in VictorOps config") } if c.APIKey != "" && len(c.APIKeyFile) > 0 { return errors.New("at most one of api_key & api_key_file must be configured") @@ -424,7 +424,7 @@ func (c *VictorOpsConfig) UnmarshalYAML(unmarshal func(any) error) error { for _, v := range reservedFields { if _, ok := c.CustomFields[v]; ok { - return fmt.Errorf("custom field %s cannot be used in Splunk On-Call config because it conflicts with the fixed/static fields", v) + return fmt.Errorf("victorOps config contains custom field %s which cannot be used as it conflicts with the fixed/static fields", v) } } diff --git a/config/notifiers_test.go b/config/notifiers_test.go index a61034d08d..0ab362dc00 100644 --- a/config/notifiers_test.go +++ b/config/notifiers_test.go @@ -121,7 +121,7 @@ routing_key: '' var cfg VictorOpsConfig err := yaml.UnmarshalStrict([]byte(in), &cfg) - expected := "missing routing key in Splunk On-Call config" + expected := "missing Routing key in VictorOps config" if err == nil { t.Fatalf("no error returned, expected:\n%v", expected) @@ -160,7 +160,7 @@ custom_fields: var cfg VictorOpsConfig err := yaml.UnmarshalStrict([]byte(in), &cfg) - expected := "custom field entity_state cannot be used in Splunk On-Call config because it conflicts with the fixed/static fields" + expected := "victorOps config contains custom field entity_state which cannot be used as it conflicts with the fixed/static fields" if err == nil { t.Fatalf("no error returned, expected:\n%v", expected) diff --git a/docs/configuration.md b/docs/configuration.md index 47ae258a1b..14d2797432 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1907,7 +1907,8 @@ attributes: Splunk On-Call (formerly VictorOps) notifications are sent through the [Splunk On-Call REST endpoint integration](https://help.splunk.com/en/splunk-enterprise/alert-and-respond/splunk-on-call/integrations-with-splunk-on-call/rest-endpoint-integration-for-splunk-on-call). The `victorops_config` name and related `victorops_*` global fields are retained -for backward compatibility. +for backward compatibility. Metrics, logs, traces, and validation errors also +continue to use the VictorOps identifier so existing integrations remain stable. ```yaml # Whether to notify about resolved alerts.