circonus

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 26 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, staticInputTags map[string]string, value interface{}, ts time.Time) error

func ConvertTags added in v0.0.24

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

func GCPMetricTypePrefixInclude added in v0.0.35

func GCPMetricTypePrefixInclude() []string

GCPMetricTypePrefixInclude returns default list of metric type prefixes to include for circonus_stackdriver input plugin ONLY

func GetGlobalTags added in v0.0.26

func GetGlobalTags() trapmetrics.Tags

func Initialize

func Initialize(cfg *config.CirconusConfig) error

func MapToTags added in v0.0.47

func MapToTags(mtags map[string]string) []string

MapToTags converts a map[string]string to []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)
hostname = 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

func UpdateCheckTags added in v0.0.47

func UpdateCheckTags(ctx context.Context, dest *trapmetrics.TrapMetrics) error

func VerifyTags added in v0.0.47

func VerifyTags(tags []string) ([]string, bool)

VerifyTags is used to ensure that a list of tags provided in a config are not blank and to lowercase them.

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 {
	DebugAPI         *bool             // allow override of api debugging per output
	TraceMetrics     *string           // allow override of metric tracing per output
	CheckDisplayName string            // check display name
	CheckTarget      string            // check target
	CheckTags        map[string]string // tags for a specific instance of a check
	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)
	MetricMeta       MetricMeta
}

type MetricMeta added in v0.0.35

type MetricMeta 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")
	ProjectID     string // metric tag project_id (stackdriver_circonus)
}

func (MetricMeta) Key added in v0.0.35

func (m MetricMeta) Key() string

Jump to

Keyboard shortcuts

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