Documentation ¶
Index ¶
Constants ¶
const (
FilenameLabel = "filename"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config describes behavior for Target
func (*Config) RegisterFlags ¶
RegisterFlags register flags.
type FileTarget ¶
type FileTarget struct {
// contains filtered or unexported fields
}
FileTarget describes a particular set of logs. nolint:revive
func NewFileTarget ¶
func NewFileTarget( metrics *Metrics, logger log.Logger, handler api.EntryHandler, positions positions.Positions, path string, labels model.LabelSet, discoveredLabels model.LabelSet, targetConfig *Config, fileEventWatcher chan fsnotify.Event, targetEventHandler chan fileTargetEvent, ) (*FileTarget, error)
NewFileTarget create a new FileTarget.
func (*FileTarget) DiscoveredLabels ¶
func (t *FileTarget) DiscoveredLabels() model.LabelSet
DiscoveredLabels implements a Target
func (*FileTarget) Ready ¶
func (t *FileTarget) Ready() bool
Ready if at least one file is being tailed
type FileTargetManager ¶
type FileTargetManager struct {
// contains filtered or unexported fields
}
FileTargetManager manages a set of targets. nolint:revive
func NewFileTargetManager ¶
func NewFileTargetManager( metrics *Metrics, logger log.Logger, positions positions.Positions, client api.EntryHandler, scrapeConfigs []scrapeconfig.Config, targetConfig *Config, ) (*FileTargetManager, error)
NewFileTargetManager creates a new TargetManager.
func (*FileTargetManager) ActiveTargets ¶
func (tm *FileTargetManager) ActiveTargets() map[string][]target.Target
ActiveTargets returns the active targets currently being scraped.
func (*FileTargetManager) AllTargets ¶
func (tm *FileTargetManager) AllTargets() map[string][]target.Target
AllTargets returns all targets, active and dropped.
func (*FileTargetManager) Ready ¶
func (tm *FileTargetManager) Ready() bool
Ready if there's at least one file target
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics hold the set of file-based metrics.
func NewMetrics ¶
func NewMetrics(reg prometheus.Registerer) *Metrics
NewMetrics creates a new set of file metrics. If reg is non-nil, the metrics will be registered.