Documentation ¶
Overview ¶
Package circonus contains methods for interfacing with circonus
Index ¶
- Constants
- type AlertContact
- type Check
- func (c *Check) AddGauge(metricName string, tags cgm.Tags, value interface{})
- func (c *Check) AddHistSample(metricName string, tags cgm.Tags, value float64)
- func (c *Check) AddText(metricName string, tags cgm.Tags, value string)
- func (c *Check) DefaultCGMTags() cgm.Tags
- func (c *Check) FlushCGM(ctx context.Context, ts *time.Time, lg zerolog.Logger, agentStats bool)
- func (c *Check) IncrementCounter(metricName string, tags cgm.Tags)
- func (c *Check) IncrementCounterByValue(metricName string, tags cgm.Tags, val uint64)
- func (c *Check) LogAgentMetrics() bool
- func (c *Check) NewTagList(tagSets ...[]string) []string
- func (c *Check) QueueMetricSample(metrics map[string]MetricSample, metricName, metricType string, ...) error
- func (c *Check) ResetSubmitStats()
- func (c *Check) SetCounter(metricName string, tags cgm.Tags, value uint64)
- func (c *Check) SubmitMetrics(ctx context.Context, metrics map[string]MetricSample, ...) error
- func (c *Check) SubmitStats() Stats
- func (c *Check) TagListToCGM(tags []string) cgm.Tags
- func (c *Check) UseCompression() bool
- type CustomRules
- type DefaultAlerts
- type Metric
- type MetricFilter
- type MetricSample
- type RuleSettings
- type Stats
- type Tag
- type Tags
- type TrapResult
Constants ¶
const ( // MetricTypeInt32 reconnoiter MetricTypeInt32 = "i" // MetricTypeUint32 reconnoiter MetricTypeUint32 = "I" // MetricTypeInt64 reconnoiter MetricTypeInt64 = "l" // MetricTypeUint64 reconnoiter MetricTypeUint64 = "L" // MetricTypeFloat64 reconnoiter MetricTypeFloat64 = "n" // MetricTypeString reconnoiter MetricTypeString = "s" // MetricTypeHistogram reconnoiter MetricTypeHistogram = "h" // MetricTypeCumulativeHistogram reconnoiter MetricTypeCumulativeHistogram = "H" MaxTagLen = 256 // sync w/NOIT_TAG_MAX_PAIR_LEN https://github.com/circonus-labs/reconnoiter/blob/master/src/noit_metric.h#L102 MaxTagCat = 254 // sync w/NOIT_TAG_MAX_CAT_LEN https://github.com/circonus-labs/reconnoiter/blob/master/src/noit_metric.h#L104 // MaxTags reconnoiter will accept in stream tagged metric name MaxTags = 256 // sync w/MAX_TAGS https://github.com/circonus-labs/reconnoiter/blob/master/src/noit_metric.h#L46 // MaxMetricNameLen reconnoiter will accept (name+stream tags) MaxMetricNameLen = 4096 // sync w/MAX_METRIC_TAGGED_NAME https://github.com/circonus-labs/reconnoiter/blob/master/src/noit_metric.h#L45 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertContact ¶ added in v0.9.0
type Check ¶
type Check struct {
// contains filtered or unexported fields
}
func (*Check) AddHistSample ¶ added in v0.5.0
AddHistSample to queue for submission
func (*Check) DefaultCGMTags ¶ added in v0.9.10
DefaultCGMTags returns the list of default tags in CGM format
func (*Check) IncrementCounter ¶ added in v0.5.0
IncrementCounter to queue for submission
func (*Check) IncrementCounterByValue ¶ added in v0.9.5
IncrementCounterByValue to queue for submission
func (*Check) LogAgentMetrics ¶ added in v0.9.10
LogAgentMetrics will dump the submission request to stdout
func (*Check) NewTagList ¶ added in v0.10.0
func (*Check) QueueMetricSample ¶
func (c *Check) QueueMetricSample( metrics map[string]MetricSample, metricName, metricType string, streamTags, measurementTags []string, value interface{}, timestamp *time.Time) error
QueueMetricSample to queue for submission
func (*Check) ResetSubmitStats ¶
func (c *Check) ResetSubmitStats()
ResetSubmitStats zeros submission stats
func (*Check) SetCounter ¶ added in v0.5.5
SetCounter to queue for submission
func (*Check) SubmitMetrics ¶ added in v0.7.1
func (c *Check) SubmitMetrics(ctx context.Context, metrics map[string]MetricSample, resultLogger zerolog.Logger, includeStats bool) error
Submit sends metrics to a circonus trap
func (*Check) SubmitStats ¶
SubmitStats returns copy of the submission stats
func (*Check) UseCompression ¶
UseCompression indicates whether the data being sent should be compressed
type CustomRules ¶ added in v0.9.0
type DefaultAlerts ¶ added in v0.9.0
type DefaultAlerts struct { RuleSettings map[string]RuleSettings `json:"rule_settings"` Contact AlertContact `json:"contact"` }
type Metric ¶ added in v0.7.1
type Metric struct { Name string Value MetricSample }
type MetricFilter ¶ added in v0.7.1
type MetricSample ¶
type RuleSettings ¶ added in v0.9.0
type Stats ¶
type Stats struct { SentSize string LocFiltered uint64 // agent: filtered based on namerx BkrFiltered uint64 // broker: filtered RecvMetrics uint64 // broker: "stats" received SentMetrics uint64 // agent: total "unique" metrics sent SentBytes uint64 }
Stats defines the submission stats tracked across metric submissions to broker