Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentGenerator ¶ added in v0.17.0
type AgentGenerator struct { }
AgentGenerator is generator of metrics about the running agent itself
func (*AgentGenerator) CustomIdentifier ¶ added in v0.53.0
func (g *AgentGenerator) CustomIdentifier() *string
CustomIdentifier for PluginGenerator interface
func (*AgentGenerator) Generate ¶ added in v0.17.0
func (g *AgentGenerator) Generate() (Values, error)
Generate generates the memory usage of the running agent itself
func (*AgentGenerator) PrepareGraphDefs ¶ added in v0.53.0
func (g *AgentGenerator) PrepareGraphDefs() ([]*mkr.GraphDefsParam, error)
PrepareGraphDefs for PluginGenerator interface
type FilesystemGenerator ¶ added in v0.31.0
FilesystemGenerator is common filesystem metrics generator on unix os.
func (*FilesystemGenerator) Generate ¶ added in v0.31.0
func (g *FilesystemGenerator) Generate() (Values, error)
Generate the metrics of filesystems
type InterfaceGenerator ¶
InterfaceGenerator generates interface metric values
func (*InterfaceGenerator) Generate ¶
func (g *InterfaceGenerator) Generate() (Values, error)
Generate interface metric values
type LoadavgGenerator ¶ added in v0.57.0
type LoadavgGenerator struct { }
LoadavgGenerator generates load average values
func (*LoadavgGenerator) Generate ¶ added in v0.57.0
func (g *LoadavgGenerator) Generate() (Values, error)
Generate load averages
type PluginFaultError ¶ added in v0.83.0
type PluginFaultError struct {
Err error
}
PluginFaultError may be returned by [PluginGenerator.PrepareGraphDefs]. This error indicates a bug in a plugin and should be logged for a user. Note that [PluginGenerator.PrepareGraphDefs] can also return other error types.
func (*PluginFaultError) Error ¶ added in v0.83.0
func (e *PluginFaultError) Error() string
func (*PluginFaultError) Unwrap ¶ added in v0.83.0
func (e *PluginFaultError) Unwrap() error
type PluginGenerator ¶
type PluginGenerator interface { Generator PrepareGraphDefs() ([]*mkr.GraphDefsParam, error) CustomIdentifier() *string }
PluginGenerator generates metrics of plugin
func NewPluginGenerator ¶ added in v0.13.0
func NewPluginGenerator(conf *config.MetricPlugin) PluginGenerator
NewPluginGenerator XXX
type ValuesCustomIdentifier ¶ added in v0.31.0
ValuesCustomIdentifier holds the metric values with the optional custom identifier
func MergeValuesCustomIdentifiers ¶ added in v0.31.0
func MergeValuesCustomIdentifiers(values []*ValuesCustomIdentifier, newValue *ValuesCustomIdentifier) []*ValuesCustomIdentifier
MergeValuesCustomIdentifiers merges the metric values and custom identifiers