circonus

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGlobalTags added in v0.0.26

func AddGlobalTags(tags map[string]string)

func AddMetricToDest added in v0.0.24

func AddMetricToDest(dest *trapmetrics.TrapMetrics, pluginID, metricGroup, metricName string, metricTags map[string]string, value interface{}, ts time.Time) error

func ConvertTags added in v0.0.24

func ConvertTags(pluginID, metricGroup string, tags map[string]string) trapmetrics.Tags

func GetGlobalTags added in v0.0.26

func GetGlobalTags() trapmetrics.Tags

func Initialize

func Initialize(cfg *config.CirconusConfig, err error) error

func MakeDestinationKey added in v0.0.27

func MakeDestinationKey(pluginID, instanceID, metricGroupID string) string

func NewMetricDestination

func NewMetricDestination(opts *MetricDestConfig, logger cua.Logger) (*trapmetrics.TrapMetrics, error)

NewMetricDestination will find/retrieve/create a new circonus check bundle and add it to a trap metrics instance to be used as a metric destination.

pluginID = id/name (e.g. inputs.cpu would be cpu, inputs.snmp would be snmp)
instanceID = instance_id setting from the config
metricGroupID = group of metrics from the plugin (some offer multiple)
checkNamePrefix = used in the display name and target of the check
logger = an instance of cua logger (already configured for the plugin requesting the metric destination)

func Ready

func Ready() bool

Types

type Circonus

type Circonus struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type Logshim

type Logshim struct {
	// contains filtered or unexported fields
}

Logshim is for api and traps - it uses the info level and agent debug logging are controlled independently

func (Logshim) Debugf

func (l Logshim) Debugf(fmt string, args ...interface{})

func (Logshim) Errorf

func (l Logshim) Errorf(fmt string, args ...interface{})

func (Logshim) Infof

func (l Logshim) Infof(fmt string, args ...interface{})

func (Logshim) Printf

func (l Logshim) Printf(fmt string, args ...interface{})

func (Logshim) Warnf

func (l Logshim) Warnf(fmt string, args ...interface{})

type MetricDestConfig added in v0.0.28

type MetricDestConfig struct {
	PluginID        string  // plugin id or name (e.g. snmp, ping, etc.)
	InstanceID      string  // plugin instance id (all plugins require an instance_id setting)
	MetricGroupID   string  // metric group id (some plugins produce multiple "metric groups")
	APIToken        string  // allow override of api token for a specific plugin (dm input or circonus output)
	Broker          string  // allow override of broker for a specific plugin (dm input or circonus output)
	CheckNamePrefix string  // allow override of check name prefix for a specific plugin (dm input or circonus output)
	DebugAPI        *bool   // allow override of api debugging per output
	TraceMetrics    *string // allow override of metric tracing per output
}

Jump to

Keyboard shortcuts

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