Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Name of plugin Name = "mysql" // Version of plugin Version = 4 // Type of plugin Type = plugin.CollectorPluginType )
Variables ¶
This section is empty.
Functions ¶
func NewCollector ¶
func NewCollector(statsSource mysqlSource, useInnodb bool) *metricCollector
NewCollector constructs new metricCollector that will query given statsSource. useInnodb indicates if innodb statistics are gathered (and gathering will fail if they are unavailable).
Types ¶
type MySQLPlugin ¶
type MySQLPlugin struct {
// contains filtered or unexported fields
}
MySQLPlugin is implementation of plugin.Plugin interface.
func (*MySQLPlugin) CollectMetrics ¶
func (p *MySQLPlugin) CollectMetrics(mts []plugin.MetricType) ([]plugin.MetricType, error)
CollectMetrics finds required request ids required to collect given metrics, asks collector service for metrics associated with these calls and returns requested metrics. Error is returned when metric collection failed or plugin initialization was unsuccessful.
func (*MySQLPlugin) GetConfigPolicy ¶
func (p *MySQLPlugin) GetConfigPolicy() (*cpolicy.ConfigPolicy, error)
GetConfigPolicy returns plugin config policy
func (*MySQLPlugin) GetMetricTypes ¶
func (p *MySQLPlugin) GetMetricTypes(cfg plugin.ConfigType) ([]plugin.MetricType, error)
GetMetricTypes returns list of available metrics. If initialization failed error is returned.
Click to show internal directories.
Click to hide internal directories.