Documentation ¶
Index ¶
Constants ¶
View Source
const (
DuIndex = "du -al --max-depth=1 %s/data/*/*/*/index | grep index$"
)
View Source
const (
ErrLogFormat = "error.log"
)
View Source
const (
ErrLogMst = "err_log"
)
View Source
const (
HttpTimeout = 10 * time.Second
)
Variables ¶
View Source
var ( ReportQueryFrequency = time.Minute ClusterMetric = "cluster_metric" MstMetric = "measurement_metric" ShowDatabases = "SHOW DATABASES" ShowMeasurements = "SHOW MEASUREMENTS" ShowSeriesCardinality = "SHOW SERIES CARDINALITY FROM \"%s\"" )
View Source
var ( MinBatchSize = 100 ReportFrequency = 5 * time.Second ReportLogFrequency = 10 * time.Second WaitRotationEnd = 10 * time.Second MaxRetryTimes = 20 )
Easy to test modify
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct { Reporter *ReportJob // contains filtered or unexported fields }
func NewCollector ¶
func (*Collector) ListenFiles ¶
type HTTPClient ¶
HTTPClient interface
type NodeCollector ¶
type NodeCollector struct { Reporter *ReportJob // contains filtered or unexported fields }
func NewNodeCollector ¶
func NewNodeCollector(logger *logger.Logger, conf *config.MonitorMain) *NodeCollector
func (*NodeCollector) Close ¶
func (nc *NodeCollector) Close()
func (*NodeCollector) Start ¶
func (nc *NodeCollector) Start()
type QueryMetric ¶
type QueryMetric struct { Client HTTPClient Reporter *ReportJob // contains filtered or unexported fields }
func NewQueryMetric ¶
func NewQueryMetric(logger *logger.Logger, conf *config.MonitorQuery) *QueryMetric
func (*QueryMetric) Close ¶
func (q *QueryMetric) Close()
func (*QueryMetric) Start ¶
func (q *QueryMetric) Start()
type ReportJob ¶
type ReportJob struct { Client HTTPClient Hook func() // contains filtered or unexported fields }
func NewReportJob ¶
func (*ReportJob) CreateDatabase ¶
func (*ReportJob) ReportMetric ¶
func (*ReportJob) StartErrLogJob ¶
type ReportStat ¶
type ReportStat struct {
// contains filtered or unexported fields
}
func NewReportStat ¶
func NewReportStat() *ReportStat
func (*ReportStat) Delete ¶
func (s *ReportStat) Delete(key string)
func (*ReportStat) TryAgain ¶
func (s *ReportStat) TryAgain(key string) bool
Click to show internal directories.
Click to hide internal directories.