Versions in this module Expand all Collapse all v1 v1.0.0 Jan 7, 2022 Changes in this version + const INIT_INDEX + const Namespace + const WORK_STATUS_ING + const WORK_STATUS_STOP + var BasicLabels = []string + var BasicLabelsMap = map[string]string + func CurrentNetworkStatInputByte() float64 + func CurrentNetworkStatOutputByte() float64 + func GetNetstat() (tcp map[string]int, err error) + func NewDesc(metricName string, docString string, labels []string) *prometheus.Desc + func ReadNumberFromFile(name string) (n float64, err error) + func RunPrometheusExporter(mon *Monitor, c *ExporterConf) error + type BigKeyConfS struct + Enable bool + EnableCache bool + KeyMaxBytes int + LruSize int + MaxCacheLifeTime int + ValueMaxBytes int + type BigKeyDataS struct + type BigKeyExporter struct + func NewBigKeyExporter(mon *Monitor, c *ExporterConf) *BigKeyExporter + func (b *BigKeyExporter) Collect(ch chan<- prometheus.Metric) + func (b *BigKeyExporter) Describe(ch chan<- *prometheus.Desc) + type BigKeyExporterConf struct + Include []string + RecordLimit int + type BigKeyMonitorDataS struct + type BigKeyPair struct + type BigKeyStatistics struct + func (b *BigKeyStatistics) Filter() + func (b *BigKeyStatistics) GetBigKeyCount() int + func (b *BigKeyStatistics) GetBigKeyPairArray() []BigKeyPair + func (b *BigKeyStatistics) GetBigKeyValueSizeSum() int + func (b *BigKeyStatistics) Init(data []BigKeyDataS, threshold int) + func (b *BigKeyStatistics) Len() int + func (b *BigKeyStatistics) Less(i, j int) bool + func (b *BigKeyStatistics) Swap(i, j int) + type ExporterConf struct + Address string + BigKeyExporterConf BigKeyExporterConf + Enable bool + Host string + HotKeyExporterConf HotKeyExporterConf + RunTimeExporterConf RunTimeExporterConf + SlowQueryConf SlowQueryExporterConf + func (e *ExporterConf) SetDefaultHostname() + type Fields struct + Alloc int64 + Frees int64 + GCCPUFraction float64 + GCSys int64 + HeapAlloc int64 + HeapIdle int64 + HeapInuse int64 + HeapObjects int64 + HeapReleased int64 + HeapSys int64 + LastGC int64 + Lookups int64 + MCacheInuse int64 + MCacheSys int64 + MSpanInuse int64 + MSpanSys int64 + Mallocs int64 + NextGC int64 + NumCPU int64 + NumGC int64 + NumGoroutine int64 + OtherSys int64 + PauseNs int64 + PauseTotalNs int64 + StackInuse int64 + StackSys int64 + Sys int64 + TotalAlloc int64 + func (f *Fields) Values() map[string]interface{} + type FieldsFunc func(Fields) + type HotKeyConfS struct + Enable bool + EnableCache bool + LruSize int + MaxCacheLifeTime int + MonitorJobInterval int + MonitorJobLifeTime int + SecondHotThreshold int + SecondIncreaseThreshold int + type HotKeyCountDataS map[string]uint64 + type HotKeyDataS struct + type HotKeyExporter struct + func NewHotKeyExporter(mon *Monitor, c *ExporterConf) *HotKeyExporter + func (n *HotKeyExporter) Collect(ch chan<- prometheus.Metric) + func (n *HotKeyExporter) Describe(ch chan<- *prometheus.Desc) + type HotKeyExporterConf struct + Include []string + RecordLimit int + type HotKeyMonitorDataS struct + HotKeyData HotKeyCountDataS + TimeRange *TimePair + func (hkmd *HotKeyMonitorDataS) ReSetData() + type HotKeyPair struct + type HotKeyStatistics struct + func (h *HotKeyStatistics) Filter() + func (h *HotKeyStatistics) GetHotKeyPairArray() []HotKeyPair + func (h *HotKeyStatistics) GetHotKeyTotal() int + func (h *HotKeyStatistics) Init(data *HotKeyMonitorDataS, threshold int) + func (h *HotKeyStatistics) Len() int + func (h *HotKeyStatistics) Less(i, j int) bool + func (h *HotKeyStatistics) Swap(i, j int) + type KeyMonitor struct + type Monitor struct + BigKeyConf *BigKeyConfS + BigKeyMonitorData *BigKeyMonitorDataS + Cache *cache.Cache + ConnectionGauge prometheus.Gauge + HotKeyConf *HotKeyConfS + HotKeyMonitorData *HotKeyMonitorDataS + KeyMonitor *KeyMonitor + SlowQueryConf *SlowQueryConfS + SlowQueryMonitorData *SlowQueryMonitorDataS + func GetNewMonitor(hotKeyConf *HotKeyConfS, bigKeyConf *BigKeyConfS, ...) (m *Monitor, err error) + func (m *Monitor) AddBigKeyCacheItem(cache *cache.Cache, key, value []byte, expireMilliSeconds int) bool + func (m *Monitor) AddHotKeyCacheItem(cache *cache.Cache, key string, value []byte, expireMilliSeconds int) bool + func (m *Monitor) BeginMonitorHotKey() + func (m *Monitor) GetBigKeyData() []BigKeyDataS + func (m *Monitor) GetSlowQueryData() (data []*SlowQueryDataS, count int) + func (m *Monitor) IsShouldPutHotKey() bool + func (m *Monitor) IsSlowQuery(args []interface{}, startTime time.Time, endTime time.Time) + func (m *Monitor) PutBigKey(key string, valueSize int) bool + func (m *Monitor) PutHotKey(key string, value []byte) + type NetStatCallback func(stat *NetworkStat, err error) + type NetworkExporter struct + func NewNetExporter(c *ExporterConf) *NetworkExporter + func (s *NetworkExporter) Collect(ch chan<- prometheus.Metric) + func (s *NetworkExporter) Describe(ch chan<- *prometheus.Desc) + type NetworkStat struct + RxBytes uint64 + TxBytes uint64 + type RunTimeExporterConf struct + Enable bool + EnableCPU bool + EnableGC bool + EnableMem bool + type RuntimeExporter struct + func NewRuntimeExport(c *ExporterConf) *RuntimeExporter + func (r *RuntimeExporter) Collect(ch chan<- prometheus.Metric) + func (r *RuntimeExporter) Describe(ch chan<- *prometheus.Desc) + type SlowQueryConfS struct + Enable bool + MaxListSize int + SlowQueryTimeThreshold int + type SlowQueryDataS struct + EndTime time.Time + Resp []interface{} + StartTime time.Time + type SlowQueryExporter struct + func NewSlowQueryExporter(mon *Monitor, c *ExporterConf) *SlowQueryExporter + func (s *SlowQueryExporter) Collect(ch chan<- prometheus.Metric) + func (s *SlowQueryExporter) Describe(ch chan<- *prometheus.Desc) + type SlowQueryExporterConf struct + RecordLimit int + type SlowQueryMonitorDataS struct + Index int32 + SlowQueryDataList []*SlowQueryDataS + type SlowQueryPair struct + type SlowQueryStatistics struct + func (s *SlowQueryStatistics) Filter() + func (s *SlowQueryStatistics) GetQueryPairArray() []SlowQueryPair + func (s *SlowQueryStatistics) Init(data []*SlowQueryDataS, threshold int) + func (s *SlowQueryStatistics) Len() int + func (s *SlowQueryStatistics) Less(i, j int) bool + func (s *SlowQueryStatistics) Swap(i, j int) + type TimePair struct + End time.Time + Start time.Time