Documentation
¶
Overview ¶
Package legacy provides types for legacy/deprecated APIs.
Index ¶
- type AgentMeasurement
- type AgentMetrics
- type AggregatorMeasurement
- type ConfigValidity
- type ConfigValidityV2
- type ConfigValidityV2Property
- type ConfigValidityV2Runtime
- type CoreInstanceMetrics
- type CreateProcessingRule
- type CreateProcessingRuleTemplate
- type CreatedProcessingRule
- type FluentBitLog
- type FluentBitLogAttrs
- type FluentBitTime
- type ListProcessingRuleTemplates
- type LogAttr
- type LogSelector
- type LogSelectorKind
- type LogSelectorOpKind
- type MetricFields
- type Metrics
- type PipelineMetric
- type PreviewProcessingRule
- type ProcessingRule
- type ProcessingRuleDef
- type ProcessingRuleLanguage
- type ProcessingRuleTemplate
- type ProcessingRuleTemplates
- type ProcessingRules
- type ProcessingRulesParams
- type ProjectMeasurement
- type ProjectMetrics
- type RuleAction
- type RuleActionKind
- type StaticProcessingRuleTemplate
- type UpdateProcessingRule
- type UpdateProcessingRuleTemplate
- type ValidatedConfig
- type ValidatedConfigV2
- type ValidatingConfig
- type ValidatingConfigEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentMeasurement ¶
type AgentMeasurement struct { Plugins map[string]Metrics `json:"plugins"` Totals map[string][]MetricFields `json:"totals"` }
AgentMeasurement stores per plugin and total agent level metrics.
type AgentMetrics ¶
type AgentMetrics struct {
Measurements map[string]AgentMeasurement `json:"measurements"`
}
AgentMetrics response payload for agent level metrics.
type AggregatorMeasurement ¶
type AggregatorMeasurement struct { Metrics map[string][]MetricFields `json:"metrics"` Totals map[string][]MetricFields `json:"totals"` }
AggregatorMeasurement stores a list of metrics and totals for an aggregator.
type ConfigValidity ¶ added in v1.9.0
type ConfigValidity struct { Runtime []string `json:"runtime" ` Input map[string][]string `json:"input"` Output map[string][]string `json:"output"` Filter map[string][]string `json:"filter"` }
ConfigValidity details.
type ConfigValidityV2 ¶ added in v1.9.0
type ConfigValidityV2 struct { Runtime []ConfigValidityV2Runtime `json:"runtime" ` Input map[string][]ConfigValidityV2Property `json:"input"` Output map[string][]ConfigValidityV2Property `json:"output"` Filter map[string][]ConfigValidityV2Property `json:"filter"` }
ConfigValidityV2 details.
type ConfigValidityV2Property ¶ added in v1.9.0
type ConfigValidityV2Property struct { ID string `json:"id"` Property string `json:"property"` Text string `json:"text"` Errors []string `json:"errors"` }
ConfigValidityV2Property property details.
type ConfigValidityV2Runtime ¶ added in v1.9.0
ConfigValidityV2Runtime runtime details.
type CoreInstanceMetrics ¶
type CoreInstanceMetrics struct {
Measurements map[string]AggregatorMeasurement `json:"measurements"`
}
CoreInstanceMetrics stores a set of AggregatorMeasurement metrics for an aggregator.
type CreateProcessingRule ¶ added in v1.9.0
type CreateProcessingRule struct { PipelineID string `json:"-"` Match string `json:"match"` IsMatchRegexp bool `json:"isMatchRegexp"` Language ProcessingRuleLanguage `json:"language"` Actions []RuleAction `json:"actions"` }
CreateProcessingRule request payload.
type CreateProcessingRuleTemplate ¶ added in v1.9.0
type CreatedProcessingRule ¶ added in v1.9.0
type CreatedProcessingRule struct { ID string `json:"id" yaml:"id"` ConfigSectionID string `json:"configSectionID" yaml:"configSectionID"` FileID string `json:"fileID" yaml:"fileID"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` }
CreatedProcessingRule response payload.
type FluentBitLog ¶ added in v1.9.0
type FluentBitLog struct { Timestamp FluentBitTime Attrs FluentBitLogAttrs }
FluentBitLog is the Go representation of a fluent-bit log record. Normally, the format is an array of mixed types. [timestamp, attrs] Where timestamp is a float with seconds and nanoseconds as fraction. And attrs being an object with string key and values.
func (FluentBitLog) AsSlice ¶ added in v1.9.0
func (l FluentBitLog) AsSlice() []any
func (FluentBitLog) MarshalJSON ¶ added in v1.9.0
func (l FluentBitLog) MarshalJSON() ([]byte, error)
MarshalJSON into fluent-bit json representation of [timestamp, attrs].
func (*FluentBitLog) UnmarshalJSON ¶ added in v1.9.0
func (l *FluentBitLog) UnmarshalJSON(b []byte) error
UnmarshalJSON parses fluent-big json representation of [timestamp, attrs].
type FluentBitLogAttrs ¶ added in v1.9.0
FluentBitLogAttrs wrapper.
type ListProcessingRuleTemplates ¶ added in v1.9.0
type LogSelector ¶ added in v1.9.0
type LogSelector struct { Kind LogSelectorKind `json:"kind" yaml:"kind"` Op LogSelectorOpKind `json:"op" yaml:"op"` Expr string `json:"expr" yaml:"expr"` }
LogSelector used to match a log entry. Example:
- Source.kind=key Op=equal Target=foo matches a log with a key equal to "foo" on it.
- Source.kind=value Op=equal Target=bar matches a log with a value equal to "bar" on it.
type LogSelectorKind ¶ added in v1.9.0
type LogSelectorKind string
LogSelectorKind enum.
const ( // LogSelectorKindKey matches a log using some of its keys. LogSelectorKindKey LogSelectorKind = "key" )
type LogSelectorOpKind ¶ added in v1.9.0
type LogSelectorOpKind string
LogSelectorOpKind enum of the supported operations a selector.
const ( // LogSelectorOpKindEqual matches a log key/value equally. LogSelectorOpKindEqual LogSelectorOpKind = "equal" )
type MetricFields ¶
type MetricFields struct { Time time.Time `json:"time"` Value *float64 `json:"value"` Field string `json:"-"` Plugin string `json:"-"` }
MetricFields stores a tuple of time, value per metric.
type Metrics ¶
type Metrics struct {
Metrics map[string][]MetricFields `json:"metrics"`
}
Metrics stores a dict of metric type and its fields.
type PipelineMetric ¶
type PipelineMetric struct { Data AgentMetrics `json:"data"` Error string `json:"error"` }
PipelineMetric response payload for pipeline level metric.
type PreviewProcessingRule ¶ added in v1.9.0
type PreviewProcessingRule struct { Language ProcessingRuleLanguage `json:"language"` Actions []RuleAction `json:"actions"` Logs []FluentBitLog `json:"logs"` }
PreviewProcessingRule request payload to run and preview the input/output of a processing rule. Given some sample logs, and some actions, it shows the output log records.
type ProcessingRule ¶ added in v1.9.0
type ProcessingRule struct { ID string `json:"id" yaml:"id"` PipelineID string `json:"pipelineID" yaml:"pipelineID"` ConfigSectionID string `json:"configSectionID" yaml:"configSectionID"` FileID string `json:"fileID" yaml:"fileID"` Match string `json:"match" yaml:"match"` IsMatchRegexp bool `json:"isMatchRegexp" yaml:"isMatchRegexp"` Language ProcessingRuleLanguage `json:"language" yaml:"language"` Actions []RuleAction `json:"actions" yaml:"actions"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"` }
ProcessingRule defines a set of actions that eventually will get translated into a single fluent-bif filter. This filter is stored as a config section associated with a pipeline.
type ProcessingRuleDef ¶ added in v1.9.0
type ProcessingRuleLanguage ¶ added in v1.9.0
type ProcessingRuleLanguage string
ProcessingRuleLanguage enum of scripting languages a processing rule supports.
const ProcessingRuleLanguageLua ProcessingRuleLanguage = "lua"
ProcessingRuleLanguageLua will produce a filter in Lua.
type ProcessingRuleTemplate ¶ added in v1.9.0
type ProcessingRuleTemplate struct { ID string `json:"id" yaml:"id" db:"id"` ProjectID string `json:"projectID" yaml:"projectID" db:"project_id"` Name string `json:"name" yaml:"name" db:"name"` Definition ProcessingRuleDef `json:"definition" yaml:"definition" db:"definition"` PipelineVersion string `json:"pipelineVersion" yaml:"pipelineVersion" db:"pipeline_version"` Input string `json:"input" yaml:"input" db:"input"` IsRawInput bool `json:"isRawInput" yaml:"isRawInput" db:"is_raw_input"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt" db:"created_at"` UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt" db:"updated_at"` }
type ProcessingRuleTemplates ¶ added in v1.9.0
type ProcessingRuleTemplates struct { Items []ProcessingRuleTemplate `json:"items" yaml:"items"` EndCursor *string `json:"endCursor" yaml:"endCursor"` Count uint `json:"count" yaml:"count"` Static []StaticProcessingRuleTemplate `json:"static" yaml:"static"` }
type ProcessingRules ¶ added in v1.9.0
type ProcessingRules struct { Items []ProcessingRule `json:"items" yaml:"items"` EndCursor *string `json:"endCursor" yaml:"endCursor"` }
ProcessingRules paginated list.
type ProcessingRulesParams ¶ added in v1.9.0
ProcessingRulesParams request payload for querying processing rules.
type ProjectMeasurement ¶
type ProjectMeasurement struct { Totals map[string]*float64 `json:"totals"` Plugins map[string]Metrics `json:"plugins"` }
ProjectMeasurement struct to store project metrics, used for project level metrics.
type ProjectMetrics ¶
type ProjectMetrics struct { Measurements map[string]ProjectMeasurement `json:"measurements"` TopPlugins map[string]map[string]*float64 `json:"topPlugins"` }
ProjectMetrics response payload for project level metrics.
type RuleAction ¶ added in v1.9.0
type RuleAction struct { Kind RuleActionKind `json:"kind" yaml:"kind"` Description string `json:"description" yaml:"description"` Enabled bool `json:"enabled" yaml:"enabled"` Selectors []LogSelector `json:"selectors" yaml:"selectors"` Add *LogAttr `json:"add,omitempty" yaml:"add,omitempty"` RenameTo *string `json:"renameTo,omitempty" yaml:"renameTo,omitempty"` CopyAs *string `json:"copyAs,omitempty" yaml:"copyAs,omitempty"` MaskWith *string `json:"maskWith,omitempty" yaml:"maskWith,omitempty"` }
RuleAction within a processing rule. Each action is processed in order.
type RuleActionKind ¶ added in v1.9.0
type RuleActionKind string
RuleActionKind enum of the different action kinds a processing rule can have.
const ( // RuleActionKindAdd adds a key-value pair to the log record. RuleActionKindAdd RuleActionKind = "add" // RuleActionKindRename renames the matching key into the new key. RuleActionKindRename RuleActionKind = "rename" // RuleActionKindCopy copies the matching key into the new key. // Conserving both. RuleActionKindCopy RuleActionKind = "copy" // RuleActionKindMask causes the value associated // with the matching key to be replaced with `redacted`. RuleActionKindMask RuleActionKind = "mask" // RuleActionKindRemove removes a key-value pair // from the log record using its key. RuleActionKindRemove RuleActionKind = "remove" // RuleActionKindSkip causes a log record to be skipped entirely // using its key. RuleActionKindSkip RuleActionKind = "skip" )
type StaticProcessingRuleTemplate ¶ added in v1.9.0
type StaticProcessingRuleTemplate struct { Name string `json:"name" yaml:"name"` Definition ProcessingRuleDef `json:"definition" yaml:"definition"` }
type UpdateProcessingRule ¶ added in v1.9.0
type UpdateProcessingRule struct { ProcessingRuleID string `json:"-"` Match *string `json:"match,omitempty"` IsMatchRegexp *bool `json:"isMatchRegexp,omitempty"` Language *ProcessingRuleLanguage `json:"language,omitempty"` Actions *[]RuleAction `json:"actions,omitempty"` }
UpdateProcessingRule request payload.
type UpdateProcessingRuleTemplate ¶ added in v1.9.0
type ValidatedConfig ¶ added in v1.9.0
type ValidatedConfig struct {
Errors ConfigValidity `json:"errors"`
}
ValidatedConfig response body after validating an agent config successfully.
type ValidatedConfigV2 ¶ added in v1.9.0
type ValidatedConfigV2 struct {
Errors ConfigValidityV2 `json:"errors"`
}
ValidatedConfigV2 response body after validating an agent config successfully against the v2 endpoint.
type ValidatingConfig ¶ added in v1.9.0
type ValidatingConfig struct {
Configs []ValidatingConfigEntry `json:"config"`
}
ValidatingConfig request body for validating a config.
type ValidatingConfigEntry ¶ added in v1.9.0
type ValidatingConfigEntry struct { Command string `json:"command"` Name string `json:"name"` Optional map[string]string `json:"optional,omitempty"` ID string `json:"id"` }
ValidatingConfigEntry defines a single config to the validated. See `ValidatingConfig`.