Documentation
¶
Index ¶
- Constants
- type Config
- type Stat2MonitorReporter
- func (g *Stat2MonitorReporter) Destroy() error
- func (s *Stat2MonitorReporter) Info() model.StatInfo
- func (s *Stat2MonitorReporter) Init(ctx *plugin.InitContext) error
- func (g *Stat2MonitorReporter) IsEnable(cfg sysconfig.Configuration) bool
- func (s *Stat2MonitorReporter) Name() string
- func (s *Stat2MonitorReporter) ReportStat(t model.MetricType, info model.InstanceGauge) error
- func (g *Stat2MonitorReporter) Start() error
- func (s *Stat2MonitorReporter) Type() common.Type
- type StatType
Constants ¶
View Source
const ( // DefaultMetricsReportWindow . DefaultMetricsReportWindow = 1 * time.Minute // DefaultMetricsNumBuckets 。 DefaultMetricsNumBuckets = 12 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MetricsReportWindow *time.Duration `yaml:"metricsReportWindow"` MetricsNumBuckets int `yaml:"metricsNumBuckets"` }
Config 插件配置
func (*Config) GetBucketInterval ¶
GetBucketInterval 获取滑桶数量
type Stat2MonitorReporter ¶
type Stat2MonitorReporter struct { *plugin.PluginBase *common.RunContext // contains filtered or unexported fields }
Stat2MonitorReporter 打印统计日志到本地文件中
func (*Stat2MonitorReporter) Info ¶
func (s *Stat2MonitorReporter) Info() model.StatInfo
func (*Stat2MonitorReporter) Init ¶
func (s *Stat2MonitorReporter) Init(ctx *plugin.InitContext) error
Init 初始化插件
func (*Stat2MonitorReporter) IsEnable ¶
func (g *Stat2MonitorReporter) IsEnable(cfg sysconfig.Configuration) bool
enable
func (*Stat2MonitorReporter) Name ¶
func (s *Stat2MonitorReporter) Name() string
Name 插件名,一个类型下插件名唯一
func (*Stat2MonitorReporter) ReportStat ¶
func (s *Stat2MonitorReporter) ReportStat(t model.MetricType, info model.InstanceGauge) error
ReportStat 上报统计信息
Click to show internal directories.
Click to hide internal directories.