converter

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package converter is a library for converting prometheus/alertmanager configuration to Chronosphere.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvertedAlerts

type ConvertedAlerts struct {
	EntityGroups       []*models.Configv1Collection
	Collections        []*models.Configv1Collection
	NotificationPolicy *models.Configv1NotificationPolicy
	Receivers          []*Notifier
	Monitors           []*models.Configv1Monitor
	RecordingRules     []*models.Configv1RecordingRule
}

ConvertedAlerts contains all the entities resulting from converting Prometheus-based alerts.

func ConvertPrometheus

func ConvertPrometheus(
	rulesYAML string,
	alertManagerYAML string,
	opts Opts,
) (*ConvertedAlerts, []string, error)

ConvertPrometheus converts the provided prometheus/alertmanager configuration to Chronosphere entities.

type GroupTeamMatcher

type GroupTeamMatcher struct {
	GroupRegex string
	TeamSlug   string
}

GroupTeamMatcher captures how to map evaluation groups to teams.

type Notifier

type Notifier struct {
	*models.Configv1Notifier

	// Source is the Pagerduty source. Set only for Pagerduty notifiers.
	Source string
}

Notifier wraps a models.Configv1Notifier with additional fields that were not carried over to the config API.

type Opts

type Opts struct {
	MonitorSignalPerSeries           bool
	SeverityLabelName                string
	SeverityMappings                 map[string]string
	InferMonitorSignals              bool
	ReceiverNamesToSlugs             map[string]string
	GroupTeamMatchers                []GroupTeamMatcher
	NotificationPolicyTeamSlug       string
	AddGroupByToNotificationPolicies bool

	// Legacy options
	DisableMonitorSlugAssignment bool
	ExistsOpNotSupported         bool
	DisableContinueTrueExpansion bool
	UseBuckets                   bool
	// contains filtered or unexported fields
}

Opts are options for converting prometheus/alertmanager configuration to Chronosphere entities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL