Documentation
¶
Overview ¶
Package scanner parses log files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CRDBv2AuthParser ¶
type CRDBv2AuthParser struct{}
CRDBv2AuthParser is a parser for cockroach-sql-auth logs.
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric defines the prometheus counter to increment when a line matches the regular expression.
type Parser ¶
type Parser interface {
// Parse a single line and produce a metric if the line satisfy the metric filter.
Parse([]byte, *Metric) error
}
Parser implements the custom logic to parse a specific log file type.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner scans a log file to extract the given metrics.
func FromConfig ¶
func FromConfig( scan *store.Scan, config *Config, registerer prometheus.Registerer, ) (*Scanner, error)
FromConfig creates a new scanner, based on the configuration provided.
func (*Scanner) GetLastModified ¶
GetLastModified returns the last time the scanner configuration was updated.
Click to show internal directories.
Click to hide internal directories.