Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) CountPrefix ¶
type Config ¶
type Config struct {
// > @3@4@5@6
// >
// > Fields used to group events before calculating cardinality.
// > Events with the same key values are aggregated together.
// > Required for proper cardinality tracking per logical group.
KeyFields []cfg.FieldSelector `json:"key" slice:"true" required:"true"` // *
// > @3@4@5@6
// >
// > Target fields whose unique values are counted within each key group.
// > The plugin monitors how many distinct values these fields contain.
// > Required to define what constitutes high cardinality.
Fields []cfg.FieldSelector `json:"fields" slice:"true" required:"true"` // *
// > @3@4@5@6
// >
// > Action to perform when cardinality limit is exceeded.
// > Determines whether to discard events, remove fields, or just monitor.
// > Choose based on whether you need to preserve other event data.
Action string `json:"action" default:"nothing" options:"discard|remove_fields|nothing"` // *
// > @3@4@5@6
// >
// > Prefix added to metric names for better organization.
// > Useful when running multiple instances to avoid metric name collisions.
// > Leave empty for default metric naming.
MetricPrefix string `json:"metric_prefix" default:""` // *
// > @3@4@5@6
// >
// > Maximum allowed number of unique values for monitored fields.
// > When exceeded within a key group, the configured action triggers.
// > Set based on expected diversity and system capacity.
Limit int `json:"limit" default:"10000"` // *
// > @3@4@5@6
// >
// > Time-to-live for cardinality tracking cache entries.
// > Prevents unbounded memory growth by forgetting old unique values.
// > Should align with typical patterns of field value changes.
TTL cfg.Duration `json:"ttl" default:"1h" parse:"duration"` // *
TTL_ time.Duration
}
! config-params ^ config-params
Click to show internal directories.
Click to hide internal directories.