python

package
v4.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	config.MonitorConfig `yaml:",inline" acceptsEndpoints:"true"`
	// Host will be filled in by auto-discovery if this monitor has a discovery
	// rule.  It can then be used under pluginConfig by the template
	// `{{.Host}}`
	Host string `yaml:"host"`
	// Port will be filled in by auto-discovery if this monitor has a discovery
	// rule.  It can then be used under pluginConfig by the template
	// `{{.Port}}`
	Port uint16 `yaml:"port"`
	// Corresponds to the ModuleName option in collectd-python
	ModuleName string `yaml:"moduleName" json:"moduleName"`
	// Corresponds to a set of ModulePath options in collectd-python
	ModulePaths []string `yaml:"modulePaths" json:"modulePaths"`
	// This is a yaml form of the collectd config.
	PluginConfig map[string]interface{} `yaml:"pluginConfig" json:"pluginConfig" neverLog:"true"`
	// A set of paths to [types.db files](https://collectd.org/documentation/manpages/types.db.5.shtml)
	// that are needed by your plugin.  If not specified, the runner will use
	// the global collectd types.db file.
	TypesDBPaths []string `yaml:"typesDBPaths" json:"typesDBPaths"`
}

Config specifies configurations that are specific to the individual python based monitor

func (*Config) PythonConfig

func (c *Config) PythonConfig() *Config

PythonConfig returns the embedded python.CoreConfig struct from the interface

type PyConfig

type PyConfig interface {
	config.MonitorCustomConfig
	PythonConfig() *Config
}

PyConfig is an interface for passing in Config structs derrived from the Python Config struct

type PyMonitor

type PyMonitor struct {
	*pyrunner.MonitorCore

	Output types.Output
}

PyMonitor that runs collectd python plugins directly

func (*PyMonitor) Configure

func (m *PyMonitor) Configure(conf PyConfig) error

Configure starts the subprocess and configures the plugin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL