Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultScrapeConfig = Config{ PipelineStages: stages.PipelineStages{}, }
DefaultScrapeConfig is the default Config.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { JobName string `yaml:"job_name,omitempty"` PipelineStages stages.PipelineStages `yaml:"pipeline_stages,omitempty"` JournalConfig *JournalTargetConfig `yaml:"journal,omitempty"` RelabelConfigs []*relabel.Config `yaml:"relabel_configs,omitempty"` ServiceDiscoveryConfig ServiceDiscoveryConfig `yaml:",inline"` }
Config describes a job to scrape.
func (*Config) HasServiceDiscoveryConfig ¶
HasServiceDiscoveryConfig checks to see if the service discovery used for file targets is non-zero.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type JournalTargetConfig ¶
type JournalTargetConfig struct { // MaxAge determines the oldest relative time from process start that will // be read and sent to Loki. Values like 14h means no entry older than // 14h will be read. If unspecified, defaults to 7h. // // A relative time specified here takes precedence over the saved position; // if the cursor is older than the MaxAge value, it will not be used. MaxAge string `yaml:"max_age"` // JSON forces the output message of entries read from the journal to be // JSON. The message will contain all original fields from the source // journal entry. JSON bool `yaml:"json"` // Labels optionally holds labels to associate with each record coming out // of the journal. Labels model.LabelSet `yaml:"labels"` // Path to a directory to read journal entries from. Defaults to system path // if empty. Path string `yaml:"path"` }
JournalTargetConfig describes systemd journal records to scrape.
type ServiceDiscoveryConfig ¶
type ServiceDiscoveryConfig struct { // List of static configurations StaticConfigs discovery.StaticConfig `yaml:"static_configs"` // List of file service discovery configurations. FileSDConfigs []*file.SDConfig `yaml:"file_sd_configs,omitempty"` }
func (ServiceDiscoveryConfig) Configs ¶
func (cfg ServiceDiscoveryConfig) Configs() (res discovery.Configs)
Click to show internal directories.
Click to hide internal directories.