exporters

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

README

KubeCope exporters package

This package contains the exporters for the KubeCope project.

Exporters

The following exporters are available:

Alertmanager

The Alertmanager exporter is used to send alerts to the Alertmanager. The Alertmanager will then send the alerts to the configured receivers. To enable the Alertmanager exporter, set the following environment variables:

  • ALERTMANAGER_URL: The URL of the Alertmanager. Example: localhost:9093
STD OUT

The STD OUT exporter is used to print the alerts to the standard output. This exporter is enabled by default. To disable the STD OUT exporter, set the following environment variable:

  • STDOUT_ENABLED: Set to false to disable the STD OUT exporter.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitExporters

func InitExporters(exportersConfig ExportersConfig)

InitExporters initializes all exporters

func PriorityToStatus

func PriorityToStatus(priority int) string

func SendAlert

func SendAlert(failedRule rule.RuleFailure)

Types

type AlertManagerExporter

type AlertManagerExporter struct {
	Host     string
	NodeName string
	// contains filtered or unexported fields
}

func InitAlertManagerExporter

func InitAlertManagerExporter(alertmanagerURL string) *AlertManagerExporter

func (*AlertManagerExporter) SendAlert

func (ame *AlertManagerExporter) SendAlert(failedRule rule.RuleFailure)

type Exporter

type Exporter interface {
	// SendAlert sends an alert to the exporter
	SendAlert(failedRule rule.RuleFailure)
}

generic exporter interface

type ExportersConfig

type ExportersConfig struct {
	StdoutExporter          *bool  `yaml:"stdoutExporter"`
	AlertManagerExporterURL string `yaml:"alertManagerExporterURL"`
}

type StdoutExporter

type StdoutExporter struct {
	// contains filtered or unexported fields
}

func InitStdoutExporter

func InitStdoutExporter(useStdout *bool) *StdoutExporter

func (*StdoutExporter) SendAlert

func (exporter *StdoutExporter) SendAlert(failedRule rule.RuleFailure)

Jump to

Keyboard shortcuts

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