agent

package
v0.0.0-...-cd47023 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAggregator

func NewAggregator(
	metrics chan metric.Metric,
	conf *config.Config,
) metric.Aggregator

NewAggregator XXX

Types

type Agent

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

Agent runs agent and collects data based on the given config

func NewAgent

func NewAgent(conf *config.Config) *Agent

NewAgent returns an Agent struct based off the given Config

func (*Agent) Run

func (a *Agent) Run(shutdown chan struct{}) error

Run runs the agent daemon, collecting every Interval

func (*Agent) Test

func (a *Agent) Test() error

Test verifies that we can 'collect' from all Plugins with their configured Config struct

type Collector

type Collector struct {
	*emitter.Emitter
	// contains filtered or unexported fields
}

Collector posts metrics to Forwarder API.

func NewCollector

func NewCollector(conf *config.Config) *Collector

NewCollector creates a new instance of Collector.

func (*Collector) Post

func (c *Collector) Post(metrics []interface{}) error

Post sends the metrics to Forwarder API.

type Payload

type Payload struct {
	AgentVersion        string                 `json:"agentVersion"`
	CollectionTimestamp int64                  `json:"collection_timestamp"`
	InternalHostname    string                 `json:"internalHostname"`
	LicenseKey          string                 `json:"licenseKey"`
	Metrics             []interface{}          `json:"metrics,omitempty"`
	ServiceChecks       []interface{}          `json:"service_checks"`
	OS                  string                 `json:"os"`
	UUID                string                 `json:"uuid"`
	Gohai               map[string]interface{} `json:"gohai,omitempty"`
	Processes           map[string]interface{} `json:"processes,omitempty"`
	HostTags            map[string]interface{} `json:"host-tags,omitempty"`
	Events              map[string]interface{} `json:"events,omitempty"`
}

Payload XXX

func NewPayload

func NewPayload(conf *config.Config) *Payload

NewPayload XXX

Jump to

Keyboard shortcuts

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