base

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ValueManipulationDelta = "DELTA"
	ValueManipulationRate  = "RATE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Name        string                                 `json:"name,omitempty"`
	Type        string                                 `json:"type,omitempty"`
	ExecuteRule collectconfig.ExecuteRule              `json:"executeRule,omitempty"`
	RefMetas    map[string]*collectconfig.ElectRegMeta `json:"refMetas,omitempty"`
	Transform   Transform                              `json:"transform,omitempty"`
}

type MetricConfig

type MetricConfig struct {
	// DELTA = currentValue - lastValue
	// RATE = DELTA / SECONDS
	// GAUGE: the collected value is an instantaneous value
	ValueManipulation string `json:"valueManipulation"`
	// If KeepNegative is false, fix the result to 0 when the result is negative
	KeepNegative bool `json:"keepNegative"`
}

type Transform

type Transform struct {
	// MetricPrefix adds a prefix to the original metric name
	MetricPrefix string `json:"metricPrefix,omitempty"`
	// MetricFormat is the format of metric name.
	// Such as 'system_%s'
	MetricFormat string `json:"metricFormat,omitempty"`
	// Metric white list
	MetricWhitelist []string `json:"metricWhitelist,omitempty"`
	// Metric black list
	MetricBlacklist []string                 `json:"metricBlacklist,omitempty"`
	MetricConfigs   map[string]*MetricConfig `json:"metricConfigs,omitempty"`
	Scripts         []string                 `json:"scripts"`
}

Jump to

Keyboard shortcuts

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