Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// > @3@4@5@6
// >
// > The event field which defines the time when event was fired.
// > It is used to detect the event throughput in a particular time range.
// > If not set, the current time will be taken.
TimeField cfg.FieldSelector `json:"time_field" default:"time" parse:"selector"` // *
TimeField_ []string
// > @3@4@5@6
// >
// > It defines how to parse the time field format. Can be specified as a datetime layout in Go [time.Parse](https://pkg.go.dev/time#Parse) format or by alias.
// > List of available datetime format aliases can be found [here](/pipeline/README.md#datetime-parse-formats).
TimeFieldFormat string `json:"time_field_format" default:"rfc3339nano"` // *
// > @3@4@5@6
// >
// > List of metrics.
Metrics []Metric `json:"metrics" slice:"true" required:"true"` // *
}
! config-params ^ config-params
type Metric ¶
type Metric struct {
// > @3@4@5@6
// >
// > Name of metric
Name string `json:"name" required:"true"` // *
// > @3@4@5@6
// >
// > The type of metric. Supported types: `counter`, `gauge`.
Type string `json:"type" options:"counter|gauge" required:"true"` // *
// > @3@4@5@6
// >
// > Field selector(s) to extract the metric value from the event. If not specified or empty, the value defaults to 1 (useful for counters).
Value []cfg.FieldSelector `json:"value"` // *
// > @3@4@5@6
// >
// > Labels are key-value pairs that provide context for the metric.
Labels map[string]cfg.FieldSelector `json:"labels"` // *
// > @3@4@5@6
// >
// > Time-to-live for the metric. Defines how long the metric value should be kept in the Prometheus collector before being expired. This determines the retention period for the metric in Prometheus.
TTL cfg.Duration `json:"ttl" parse:"duration" default:"0"` // *
TTL_ time.Duration
// > @3@4@5@6
// >
// > Condition to check before emitting the metric.
DoIfCheckerMap map[string]any `json:"do_if"` // *
DoIfChecker *doif.Checker
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.