profiles

package
v0.0.0-...-e5bd767 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Package profiles contains the collection profiles supported by the metrics-anomaly-detector.

Index

Constants

View Source
const (
	ErrImplemented           = "not implemented"
	ErrLoaded                = "not loaded"
	CtxGeneratedManifestsKey = "generatedManifests"
)

Variables

View Source
var (
	SupportedCollectionProfiles           = CollectionProfiles{FullCollectionProfile, MinimalCollectionProfile}
	SupportedNonDefaultCollectionProfiles = SupportedCollectionProfiles[1:]
)
View Source
var ProfileExtractors = map[CollectionProfile]extractor{
	FullCollectionProfile: nil,

	MinimalCollectionProfile: &minimalProfileExtractor{},
}

ProfileExtractors is a map of all the profile extractor.

View Source
var ProfileOperators = map[CollectionProfile]operator{
	FullCollectionProfile: nil,

	MinimalCollectionProfile: &minimalProfileOperator{},
}

ProfileOperators is a map of all the profile operators.

Functions

func IsSupportedCollectionProfile

func IsSupportedCollectionProfile(profile CollectionProfile) bool

func ReportImplementationStatus

func ReportImplementationStatus(ctx context.Context, dc *dynamic.DynamicClient, profile CollectionProfile, noisy bool) error

ReportImplementationStatus reports the implementation status w.r.t. all supported collection profiles, and points out the monitors that are absent (partial implementations). NOTE: The general assumption for a monitor not implementing a particular profile translates to the fact that the end user simply do not want to keep ANY metrics when operating under that profile.

Types

type CollectionProfile

type CollectionProfile string
const (

	// CollectionProfileOptInLabel is the label that is used to opted-in a monitor for a particular collection profile.
	// Its absence DOES NOT currently imply that the monitor has opted-in for the FullCollectionProfile.
	CollectionProfileOptInLabel = "monitoring.openshift.io/collection-profile"

	// FullCollectionProfile is the default collection profile that collects all the metrics.
	FullCollectionProfile CollectionProfile = "full"

	// MinimalCollectionProfile is the collection profile that collects only the metrics that are strictly required for
	// the cluster to function.
	MinimalCollectionProfile CollectionProfile = "minimal"
)

type CollectionProfiles

type CollectionProfiles []CollectionProfile

type Recorder

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

func (*Recorder) Write

func (r *Recorder) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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