collector

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient added in v1.3.1

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

AWSClient is a wrapper for AWS ecs ecsClient that implements helpers to get ECS clusters metrics

func NewAWSClient added in v1.3.1

func NewAWSClient(awsRegion string) (*AWSClient, error)

NewAWSClient will return an initialized AWSClient

func (*AWSClient) GetClusterContainerInstances added in v1.3.1

func (c *AWSClient) GetClusterContainerInstances(cluster *types.ECSCluster) ([]*types.ECSContainerInstance, error)

GetClusterContainerInstances will return all the container instances from a cluster

func (*AWSClient) GetClusterServices added in v1.3.1

func (c *AWSClient) GetClusterServices(cluster *types.ECSCluster) ([]*types.ECSService, error)

GetClusterServices will return all the services from a cluster

func (*AWSClient) GetClusters added in v1.3.1

func (c *AWSClient) GetClusters() ([]*types.ECSCluster, error)

GetClusters will get the clusters from the ECS API

func (*AWSClient) GetInstances added in v1.3.1

func (c *AWSClient) GetInstances(instanceARNs []*string) ([]*ec2.Instance, error)

type EC2Gatherer added in v1.3.1

type EC2Gatherer interface {
	DescribeInstances(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)
}

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 lockable 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, collectTimeout int64,
	maxConcurrency int64) (*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