collector

package
v0.0.0-...-de18429 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationAutoScalingClient

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

ApplicationAutoScalingClient is a wrapper for AWS AutoscalingClient that gets ECS clusters metrics

func NewApplicationAutoScalingClient

func NewApplicationAutoScalingClient(s *session.Session) (*ApplicationAutoScalingClient, error)

NewApplicationAutoScalingClient will return an initialized ECSClient

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(s *session.Session) (*ECSClient, error)

NewECSClient will return an initialized ECSClient

func (*ECSClient) GetClusterContainerInstances

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(autoScalingClient *ApplicationAutoScalingClient, 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(autoScalingClient *ApplicationAutoScalingClient, 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