Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultRelabelConfig = Config{ Action: Replace, Separator: ";", Regex: mustNewRegexp("(.*)"), Replacement: "$1", }
DefaultRelabelConfig sets the default values of fields when decoding a RelabelConfig block.
Functions ¶
func ComponentToPromRelabelConfigs ¶
ComponentToPromRelabelConfigs bridges the Component-based configuration of relabeling steps to the Prometheus implementation.
Types ¶
type Action ¶
type Action string
Action is the relabelling action to be performed.
const ( Replace Action = "replace" Keep Action = "keep" Drop Action = "drop" HashMod Action = "hashmod" LabelMap Action = "labelmap" LabelDrop Action = "labeldrop" LabelKeep Action = "labelkeep" Lowercase Action = "lowercase" Uppercase Action = "uppercase" KeepEqual Action = "keepequal" DropEqual Action = "dropequal" )
All possible Action values.
func (Action) MarshalText ¶
MarshalText implements encoding.TextMarshaler for Action.
func (*Action) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler for Action.
type Config ¶
type Config struct { SourceLabels []string `alloy:"source_labels,attr,optional"` Separator string `alloy:"separator,attr,optional"` Regex Regexp `alloy:"regex,attr,optional"` Modulus uint64 `alloy:"modulus,attr,optional"` TargetLabel string `alloy:"target_label,attr,optional"` Replacement string `alloy:"replacement,attr,optional"` Action Action `alloy:"action,attr,optional"` }
Config describes a relabelling step to be applied on a target.
func (*Config) SetToDefault ¶
func (c *Config) SetToDefault()
SetToDefault implements syntax.Defaulter.
type Regexp ¶
Regexp encapsulates the Regexp type from Grafana's fork of the Go stdlib regexp package.
func (Regexp) MarshalText ¶
MarshalText implements encoding.TextMarshaler for Regexp.
func (*Regexp) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler for Regexp.