Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPluginInterval = 30 * time.Minute
View Source
const DefaultPollInterval = 3 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func RegisterModule ¶
func RegisterModule(instance Module)
Types ¶
type AbstractPlugin ¶
type AbstractPlugin struct { Parent string // name of the collector that owns this plugin Name string // name of the plugin Object string // object of the collector, describes what that collector is collecting SLogger *slog.Logger // logger used for logging Options *options.Options // poller options Params *node.Node // plugin parameters ParentParams *node.Node // parent collector parameters PluginInvocationRate int Auth *auth.Credentials }
AbstractPlugin implements methods of the Plugin interface, except Run()
func New ¶
func New(parent string, o *options.Options, p *node.Node, pp *node.Node, object string, credentials *auth.Credentials) *AbstractPlugin
New creates an AbstractPlugin
func (*AbstractPlugin) GetName ¶
func (p *AbstractPlugin) GetName() string
GetName returns the name of the plugin
func (*AbstractPlugin) Init ¶
func (p *AbstractPlugin) Init(conf.Remote) error
Init initializes the plugin by calling InitAbc
func (*AbstractPlugin) InitAbc ¶
func (p *AbstractPlugin) InitAbc() error
InitAbc initializes the plugin
func (*AbstractPlugin) Run ¶
Run should run the plugin and return collected data as an array of matrices (Since most plugins don't collect data, they will always return nil instead)
func (*AbstractPlugin) SetPluginInterval ¶
func (p *AbstractPlugin) SetPluginInterval() int
type DerivedMetric ¶
type Module ¶
type Module interface {
HarvestModule() ModuleInfo
}
type ModuleInfo ¶
func GetModule ¶
func GetModule(name string) (ModuleInfo, error)
GetModule returns module information from its ID (full name).
Click to show internal directories.
Click to hide internal directories.