stats

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

The stats service collects the exported stats and submits them to the Kapacitor stream under the configured database and retetion policy.

If you want to persist the data to InfluxDB just add a task like so:

Example:

stream
    .from()
    .influxDBOut()

Assuming using default database and retetion policy run: `kapacitor define -name _stats -type stream -tick path/to/above/script.tick -dbrp _kapacitor.default`

If you do create a task to send the data to InfluxDB make sure not to subscribe to that data in InfluxDB.

Example:

[influxdb]

...
[influxdb.excluded-subscriptions]
    _kapacitor = [ "default" ]

Index

Constants

View Source
const (
	DefaultDatabse                 = "_kapacitor"
	DefaultRetentionPolicy         = "default"
	DefaultStatsInterval           = toml.Duration(10 * time.Second)
	DefaultTimingSampleRate        = 0.10
	DefaultTimingMovingAverageSize = 1000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled                 bool          `toml:"enabled"`
	StatsInterval           toml.Duration `toml:"stats-interval"`
	Database                string        `toml:"database"`
	RetentionPolicy         string        `toml:"retention-policy"`
	TimingSampleRate        float64       `toml:"timing-sample-rate"`
	TimingMovingAverageSize int           `toml:"timing-movavg-size"`
}

func NewConfig

func NewConfig() Config

type Service

type Service struct {
	TaskMaster interface {
		Stream(name string) (kapacitor.StreamCollector, error)
	}
	// contains filtered or unexported fields
}

Sends internal stats back into the Kapacitor stream. Internal stats come from running tasks and other services running within Kapacitor.

func NewService

func NewService(c Config, l *log.Logger) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) NewTimer added in v0.11.0

func (s *Service) NewTimer(avgVar timer.Setter) timer.Timer

func (*Service) Open

func (s *Service) Open() (err error)

Jump to

Keyboard shortcuts

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