Documentation
¶
Index ¶
- type Data
- type DroppedEntry
- type Entry
- type LokiAuthConfiguration
- type LokiConfiguration
- type LokiQuery
- type LokiSource
- func (l *LokiSource) CanRun() error
- func (l *LokiSource) Configure(config []byte, logger *log.Entry, metricsLevel metrics.AcquisitionMetricsLevel) error
- func (l *LokiSource) ConfigureByDSN(dsn string, labels map[string]string, logger *log.Entry, uuid string) error
- func (l *LokiSource) Dump() interface{}
- func (l *LokiSource) GetAggregMetrics() []prometheus.Collector
- func (l *LokiSource) GetMetrics() []prometheus.Collector
- func (l *LokiSource) GetMode() string
- func (l *LokiSource) GetName() string
- func (l *LokiSource) GetUuid() string
- func (l *LokiSource) OneShotAcquisition(ctx context.Context, out chan types.Event, t *tomb.Tomb) error
- func (l *LokiSource) StreamingAcquisition(ctx context.Context, out chan types.Event, t *tomb.Tomb) error
- func (l *LokiSource) SupportedModes() []string
- func (l *LokiSource) UnmarshalConfig(yamlConfig []byte) error
- type Stream
- type StreamResult
- type Tail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
ResultType string `json:"resultType"`
Result []StreamResult `json:"result"` // Warning, just stream value is handled
Stats interface{} `json:"stats"` // Stats is boring, just ignore it
}
type DroppedEntry ¶
type Entry ¶
func (*Entry) UnmarshalJSON ¶
type LokiAuthConfiguration ¶
type LokiConfiguration ¶
type LokiConfiguration struct {
URL string `yaml:"url"` // Loki url
Prefix string `yaml:"prefix"` // Loki prefix
Query string `yaml:"query"` // LogQL query
Limit int `yaml:"limit"` // Limit of logs to read
DelayFor time.Duration `yaml:"delay_for"`
Since time.Duration `yaml:"since"`
Headers map[string]string `yaml:"headers"` // HTTP headers for talking to Loki
WaitForReady time.Duration `yaml:"wait_for_ready"` // Retry interval, default is 10 seconds
Auth LokiAuthConfiguration `yaml:"auth"`
MaxFailureDuration time.Duration `yaml:"max_failure_duration"` // Max duration of failure before stopping the source
NoReadyCheck bool `yaml:"no_ready_check"` // Bypass /ready check before starting
configuration.DataSourceCommonCfg `yaml:",inline"`
}
type LokiQuery ¶
LokiQuery GET response. See https://grafana.com/docs/loki/latest/api/#get-lokiapiv1query
type LokiSource ¶
type LokiSource struct {
Config LokiConfiguration
Client *lokiclient.LokiClient
// contains filtered or unexported fields
}
func (*LokiSource) CanRun ¶
func (l *LokiSource) CanRun() error
func (*LokiSource) Configure ¶
func (l *LokiSource) Configure(config []byte, logger *log.Entry, metricsLevel metrics.AcquisitionMetricsLevel) error
func (*LokiSource) ConfigureByDSN ¶
func (*LokiSource) Dump ¶
func (l *LokiSource) Dump() interface{}
func (*LokiSource) GetAggregMetrics ¶
func (l *LokiSource) GetAggregMetrics() []prometheus.Collector
func (*LokiSource) GetMetrics ¶
func (l *LokiSource) GetMetrics() []prometheus.Collector
func (*LokiSource) GetMode ¶
func (l *LokiSource) GetMode() string
func (*LokiSource) GetName ¶
func (l *LokiSource) GetName() string
func (*LokiSource) GetUuid ¶
func (l *LokiSource) GetUuid() string
func (*LokiSource) OneShotAcquisition ¶
func (l *LokiSource) OneShotAcquisition(ctx context.Context, out chan types.Event, t *tomb.Tomb) error
OneShotAcquisition reads a set of file and returns when done
func (*LokiSource) StreamingAcquisition ¶
func (*LokiSource) SupportedModes ¶
func (l *LokiSource) SupportedModes() []string
SupportedModes returns the supported modes by the acquisition module
func (*LokiSource) UnmarshalConfig ¶
func (l *LokiSource) UnmarshalConfig(yamlConfig []byte) error
type StreamResult ¶
type Tail ¶
type Tail struct {
Streams []Stream `json:"streams"`
DroppedEntries []DroppedEntry `json:"dropped_entries"`
}
Click to show internal directories.
Click to hide internal directories.