Documentation ¶
Overview ¶
Package redis package contains prospector and harvester to read the redis slow log
The redis slow log is stored in memory. The slow log can be activate on the redis command line as following:
CONFIG SET slowlog-log-slower-than 2000000
This sets the value of the slow log to 2000000 micro seconds (2s). All queries taking longer will be reported.
As the slow log is in memory, it can be configured how many items it consists:
CONFIG SET slowlog-max-len 200
This sets the size of the slow log to 200 entries. In case the slow log is full, older entries are dropped.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Harvester ¶
type Harvester struct {
// contains filtered or unexported fields
}
Harvester contains all redis harvester data
func NewHarvester ¶
NewHarvester creates a new harvester with the given connection
type Prospector ¶
type Prospector struct {
// contains filtered or unexported fields
}
Prospector is a prospector for redis
func NewProspector ¶
func NewProspector(cfg *common.Config, outletFactory channel.OutleterFactory) (*Prospector, error)
NewProspector creates a new redis prospector
func (*Prospector) LoadStates ¶
func (p *Prospector) LoadStates(states []file.State) error
LoadStates loads the states
func (*Prospector) Stop ¶
func (p *Prospector) Stop()
Stop stopps the prospector and all its harvesters
func (*Prospector) Wait ¶
func (p *Prospector) Wait()
Wait waits for the propsector to be completed. Not implemented.