thanos-io/thanos · error

unknown integration name

Error message

unknown integration name: %s

What it means

notifications_limit_flag.go implements a flag/yaml type mapping integration names (e.g. pagerduty, slack, email) to per-integration notification limits. updateMap validates every key of the incoming map against a fixed list of allowedIntegrationNames and rejects any key that is not a known integration.

Solutions

  1. Check the exact allowed names (allowedIntegrationNames in notifications_limit_flag.go) and fix the typo in your flag or YAML.
  2. Verify the integration exists in your binary's version; upgrade if the integration was added later.
  3. Use the config file reference/documentation for notifications limits of the matching release.
  4. Add config validation to CI (unmarshal the config with the same types) to catch unknown keys before deploy.

Example fix

// before (yaml)
notif_limits:
  paggerduty: 100
// after (yaml)
notif_limits:
  pagerduty: 100
Defensive patterns

Strategy: validation

Validate before calling

allowed := []string{"email","pagerduty","pushover","slack","opsgenie","webhook","victorops"} // see allowedIntegrationNames
for k := range notifLimits {
    if !slices.Contains(allowed, k) {
        return fmt.Errorf("unknown integration name: %s", k)
    }
}

Try / catch

if err := yaml.UnmarshalStrict(cfgBytes, &cfg); err != nil {
    return fmt.Errorf("invalid notifications limits: %w", err)
}

Prevention

When it happens

Trigger: Setting the notification limit flag or unmarshalling YAML with a typo'd or unsupported integration name as a map key (Set from CLI flags, or UnmarshalYAML from config file).

Common situations: Typo in config like "paggerduty"; using an integration name from a newer Cortex/Thanos version than the running binary; copying Alertmanager integration names that don't exist in this build.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07). Data as JSON: /api/errors/dd17d598bc03d93b. Report an issue: GitHub.

Appendix: source

Thrown at internal/cortex/util/validation/notifications_limit_flag.go:48

func (m NotificationRateLimitMap) Set(s string) error {
	newMap := map[string]float64{}
	return m.updateMap(json.Unmarshal([]byte(s), &newMap), newMap)
}

// UnmarshalYAML implements yaml.Unmarshaler.
func (m NotificationRateLimitMap) UnmarshalYAML(unmarshal func(any) error) error {
	newMap := map[string]float64{}
	return m.updateMap(unmarshal(newMap), newMap)
}

func (m NotificationRateLimitMap) updateMap(unmarshalErr error, newMap map[string]float64) error {
	if unmarshalErr != nil {
		return unmarshalErr
	}

	for k, v := range newMap {
		if !slices.Contains(allowedIntegrationNames, k) {
			return errors.Errorf("unknown integration name: %s", k)
		}
		m[k] = v
	}
	return nil
}

// MarshalYAML implements yaml.Marshaler.
func (m NotificationRateLimitMap) MarshalYAML() (any, error) {
	return map[string]float64(m), nil
}

View on GitHub (pinned to 35b8b99117)