Documentation
¶
Index ¶
- Variables
- func ClearRegistry()
- func ClearUserParamMetrics() map[string]*Metric
- func RegisterMetrics(impl Accessor, name string, params ...string) error
- func RestoreUserParamMetrics(metrics map[string]*Metric)
- type Accessor
- type Base
- func (b *Base) HandleTimeout() bool
- func (b *Base) Init(name string)
- func (b *Base) IsExternal() bool
- func (b *Base) MaxCapacity() int
- func (b *Base) Name() string
- func (b *Base) SetExternal(isExternal bool)
- func (b *Base) SetHandleTimeout(handleTimeout bool)
- func (b *Base) SetMaxCapacity(capacity int)
- type Collector
- type Configurator
- type ContextProvider
- type Exporter
- type GlobalOptions
- type Item
- type Meta
- type Metric
- type RegexpMatcher
- type Result
- type ResultWriter
- type Runner
- type SystemOptionsdeprecated
- type Watcher
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ClearRegistry ¶
func ClearRegistry()
func RegisterMetrics ¶
RegisterMetrics registers metrics for the given plugin.
Types ¶
type Accessor ¶
type Base ¶
func (*Base) HandleTimeout ¶
HandleTimeout returns handle timeout.
func (*Base) Init ¶
Init initializes base structure with name and logger.
func (*Base) IsExternal ¶
IsExternal returns whether plugin is set to be external or not.
func (*Base) MaxCapacity ¶
MaxCapacity returns base structures max capacity.
func (*Base) SetExternal ¶
SetExternal sets external bool to provided value.
func (*Base) SetHandleTimeout ¶
SetHandleTimeout sets handle timeout.
type Collector ¶
Collector - interface for periodical metric collection
type Configurator ¶
type Configurator interface { // Configure method passes global and private plugin configuration after it has been activated. Configure(globalOptions *GlobalOptions, privateOptions interface{}) // Validate method validates private plugin configuration during agent startup. Validate(privateOptions interface{}) error }
Configurator - interface for plugin configuration in agent conf files
type ContextProvider ¶
type ContextProvider interface { ClientID() uint64 ItemID() uint64 Output() ResultWriter Meta() *Meta GlobalRegexp() RegexpMatcher Timeout() int Delay() string }
type Exporter ¶
type Exporter interface { // Export method exports data based on the key 'key' and its parameters 'params'. Export( key string, params []string, context ContextProvider, ) (interface{}, error) }
Exporter - interface for exporting collected metrics
type GlobalOptions ¶
type GlobalOptions struct { Timeout int `json:"Timeout"` //nolint:tagliatelle SourceIP string `json:"SourceIP"` //nolint:tagliatelle }
GlobalOptions are global agent configuration parameters that can be accessed by plugins. In most cases it's recommended to allow plugins overriding global configuration parameters they are using with plugin specific parameters.
type Item ¶
type Meta ¶
type Meta struct { Data interface{} // contains filtered or unexported fields }
type RegexpMatcher ¶
type Result ¶
type ResultWriter ¶
type Runner ¶
type Runner interface { // Start method activates plugin. Start() // Stop method deactivates plugin. Stop() }
Runner - interface for managing background processes
type SystemOptions
deprecated
type SystemOptions struct { Path string `conf:"optional"` Capacity string `conf:"optional"` ForceActiveChecksOnStart string `conf:"optional"` }
SystemOptions contains System Options of plugin.
Deprecated: SystemOptions exists for historical compatibility with older Zabbix agent 2 versions. Currently System options are parsed and removed in Zabix agent 2.
type Watcher ¶
type Watcher interface { // Watch method instructs plugin to watch for events based on item configuration. Watch(items []*Item, context ContextProvider) }
Watcher - interface for fully custom monitoring
Source Files
¶
- base.go
- registry.go
- types.go