Trait collectd_plugin::Plugin [] [src]

pub trait Plugin {
    fn name(&self) -> &str;

    fn capabilities(&self) -> PluginCapabilities { ... }
fn config_keys(&self) -> Vec<String> { ... }
fn config_callback(
        &mut self,
        _key: String,
        _value: String
    ) -> Result<(), Error> { ... }
fn read_values(&mut self) -> Result<(), Error> { ... } }

Required Methods

Name of the plugin.

Provided Methods

A plugin's capabilities. By default a plugin does nothing, but can advertise that it can configure itself and / or report values.

Configuration keys that the plugin configures itself with. Will only be consulted if the plugin has at least a capability of CONFIG.

A key value pair related to the plugin that collectd parsed from the collectd configuration files. Will only be called if a plugin has a capability of at least CONFIG

This function is called when collectd expects the plugin to report values, which will occur at the Interval defined in the global config (but can be overridden). Implementations that expect to report values need to have at least have a capability of READ. An error in reporting values will cause collectd to backoff exponentially until a delay of a day is reached.

Implementors