agent

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent is used to retrieve and report metrics from the current host to CloudWatch

func New

func New(config *Config) (*Agent, error)

New creates a new Agent based on the supplied configuration

func (*Agent) Run

func (a *Agent) Run() error

Run executes the Agent to report metrics once or according to a predefined interval

type Config

type Config struct {
	Region     string
	Hostname   string
	Namespace  string
	Interval   int64
	RunOnce    bool
	AllMetrics bool

	// Memory
	MemUnit         string
	MemAvailable    bool
	MemUsed         bool
	MemUtilization  bool
	SwapAvailable   bool
	SwapUsed        bool
	SwapUtilization bool

	// Disk
	DiskUnit        string
	DiskAvailable   bool
	DiskUsed        bool
	DiskUtilization bool
	DiskPaths       string

	// Grouping
	AutoScaling bool
}

Config defines the configuration to use with an Agent

Jump to

Keyboard shortcuts

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