Documentation ¶
Index ¶
Constants ¶
View Source
const ( LogTypeStd = "std" LogTypeSlow = "slow" LogTypeRocksDB = "rocksdb" LogTypeUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigFileScraper ¶
type ConfigFileScraper []string
ConfigFileScraper scraps configuration files of components
func NewConfigFileScraper ¶
func NewConfigFileScraper(l []string) *ConfigFileScraper
NewConfigFileScraper creates a new ConfigFileScraper
func (*ConfigFileScraper) Scrap ¶
func (s *ConfigFileScraper) Scrap(result *Sample) error
Scrap implements the Scraper interface
type FileScraper ¶
type FileScraper struct { Paths []string // paths of log files Start time.Time // start time End time.Time // end time }
FileScraper scraps normal files of components
func NewFileScraper ¶
func NewFileScraper(l []string) *FileScraper
NewFlieScraper creates a new FileScraper
func (*FileScraper) Scrap ¶
func (s *FileScraper) Scrap(result *Sample) error
Scrap implements the Scraper interface
type FileStat ¶
FileStat is the size information of a file to scrap map: filename (full path) -> file size (bytes)
type LogScraper ¶
type LogScraper struct { Paths []string // paths of log files Types map[string]bool // log type Start time.Time // start time End time.Time // end time }
LogScraper scraps log files of components
func (*LogScraper) Scrap ¶
func (s *LogScraper) Scrap(result *Sample) error
Scrap implements the Scraper interface
type Option ¶
type Option struct { LogPaths []string // paths of log files LogTypes map[string]bool // types of log need to scrap ConfigPaths []string // paths of config files FilePaths []string // paths of normal files PrometheusDataDir string Start string // start time End string // end time }
Option is configurations of how scrapper works
type Sample ¶
type Sample struct { Log FileStat `json:"log_files,omitempty"` Config FileStat `json:"config_files,omitempty"` File FileStat `json:"files,omitempty"` TSDB FileStat `json:"prometheus_data,omitempty"` }
Sample is the result of scrapping
Click to show internal directories.
Click to hide internal directories.