collector

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECSClient

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

ECSClient is a wrapper for AWS ecs client that implements helpers to get ECS clusters metrics

func NewECSClient

func NewECSClient(awsRegion string) (*ECSClient, error)

NewECSClient will return an initialized ECSClient

func (*ECSClient) GetClusterContainerInstances added in v1.1.0

func (e *ECSClient) GetClusterContainerInstances(cluster *types.ECSCluster) ([]*types.ECSContainerInstance, error)

GetClusterContainerInstances will return all the container instances from a cluster

func (*ECSClient) GetClusterServices

func (e *ECSClient) GetClusterServices(cluster *types.ECSCluster) ([]*types.ECSService, error)

GetClusterServices will return all the services from a cluster

func (*ECSClient) GetClusters

func (e *ECSClient) GetClusters() ([]*types.ECSCluster, error)

GetClusters will get the clusters from the ECS API

type ECSGatherer

type ECSGatherer interface {
	GetClusters() ([]*types.ECSCluster, error)
	GetClusterServices(cluster *types.ECSCluster) ([]*types.ECSService, error)
	GetClusterContainerInstances(cluster *types.ECSCluster) ([]*types.ECSContainerInstance, error)
}

ECSGatherer is the interface that implements the methods required to gather ECS data

type Exporter

type Exporter struct {
	sync.Mutex // Our exporter object will be locakble to protect from concurrent scrapes
	// contains filtered or unexported fields
}

Exporter collects ECS clusters metrics

func New

func New(awsRegion string, clusterFilterRegexp string, disableCIMetrics bool) (*Exporter, error)

New returns an initialized exporter

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect fetches the stats from configured ECS and delivers them as Prometheus metrics. It implements prometheus.Collector

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics ever exported by the ECS exporter. It implements prometheus.Collector.

Jump to

Keyboard shortcuts

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