collector

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBatchSize = "0.3"
	DefaultPauseTime = "PT15M"
)
View Source
const (
	GaugeValue float64 = 1
)

Variables

View Source
var (
	NATQuotaCode   = "L-FE5A380F"
	NATQuotaName   = "nat-gateway"
	VPCServiceCode = "vpc"
)

Functions

func IsEndpointNotAvailable

func IsEndpointNotAvailable(err error) bool

IsEndpointNotAvailable asserts that an error is due to service not available in the current region.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidResource

func IsInvalidResource(err error) bool

IsInvalidResource asserts invalidResourceError.

func IsNilLimit

func IsNilLimit(err error) bool

IsNilLimit asserts nilLimitError.

func IsNilUsage

func IsNilUsage(err error) bool

IsNilUsage asserts nilUsageError.

func IsNotFound added in v1.4.0

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsParsingFailed added in v1.4.0

func IsParsingFailed(err error) bool

IsparsingFailed asserts parsingFailedError.

func IsUnsupportedPlan

func IsUnsupportedPlan(err error) bool

IsUnsupportedPlan asserts that an error is due to Trusted Advisor not being available with the current support plan.

Types

type ASG

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

ASG is the main struct for this collector.

func NewASG

func NewASG(config ASGConfig) (*ASG, error)

NewASG creates a new AutoScalingGroup metrics collector.

func (*ASG) Collect

func (a *ASG) Collect(ch chan<- prometheus.Metric) error

Collect is the main metrics collection function.

func (*ASG) Describe

func (a *ASG) Describe(ch chan<- *prometheus.Desc) error

Describe emits the description for the metrics collected here.

type ASGConfig

type ASGConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

ASGConfig is this collector's configuration struct.

type CloudFormation

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

Main struct for this collector.

func NewCloudFormation

func NewCloudFormation(config CloudFormationConfig) (*CloudFormation, error)

Creates a new CloudFormation metrics collector.

func (*CloudFormation) Collect

func (cf *CloudFormation) Collect(ch chan<- prometheus.Metric) error

Collect is the main metrics collection function.

func (*CloudFormation) Describe

func (cf *CloudFormation) Describe(ch chan<- *prometheus.Desc) error

Describe emits the description for the metrics collected here.

type CloudFormationConfig

type CloudFormationConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

Configuration struct.

type EC2Instances

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

EC2Instances is the main struct for this collector.

func NewEC2Instances

func NewEC2Instances(config EC2InstancesConfig) (*EC2Instances, error)

NewEC2Instances creates a new EC2 instance metrics collector.

func (*EC2Instances) Collect

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

Collect is the main metrics collection function.

func (*EC2Instances) Describe

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

Describe emits the description for the metrics collected here.

type EC2InstancesConfig

type EC2InstancesConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

EC2InstancesConfig is this collector's configuration struct.

type ELB

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

func NewELB

func NewELB(config ELBConfig) (*ELB, error)

func (*ELB) Collect

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

func (*ELB) Describe

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

type ELBConfig

type ELBConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

type NAT

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

func NewNAT

func NewNAT(config NATConfig) (*NAT, error)

func (*NAT) Collect

func (v *NAT) Collect(ch chan<- prometheus.Metric) error

func (*NAT) Describe

func (v *NAT) Describe(ch chan<- *prometheus.Desc) error

type NATConfig

type NATConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

type ServiceQuota

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

func NewServiceQuota

func NewServiceQuota(config ServiceQuotaConfig) (*ServiceQuota, error)

func (*ServiceQuota) Collect

func (v *ServiceQuota) Collect(ch chan<- prometheus.Metric) error

func (*ServiceQuota) Describe

func (v *ServiceQuota) Describe(ch chan<- *prometheus.Desc) error

type ServiceQuotaConfig

type ServiceQuotaConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

type Set

type Set struct {
	*collector.Set
}

Set is basically only a wrapper for the collector implementations. It eases the initialization and prevents some weird import mess so we do not have to alias packages. There is also the benefit of the helper type kept private so we do not need to expose this magic.

func NewSet

func NewSet(config SetConfig) (*Set, error)

type SetConfig

type SetConfig struct {
	Clients k8sclient.Interface
	Logger  micrologger.Logger

	AWSConfig             clientaws.Config
	InstallationName      string
	TrustedAdvisorEnabled bool
}

type Subnet added in v1.2.0

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

func NewSubnet added in v1.2.0

func NewSubnet(config SubnetConfig) (*Subnet, error)

func (*Subnet) Collect added in v1.2.0

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

func (*Subnet) Describe added in v1.2.0

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

type SubnetConfig added in v1.2.0

type SubnetConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

type TrustedAdvisor

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

func NewTrustedAdvisor

func NewTrustedAdvisor(config TrustedAdvisorConfig) (*TrustedAdvisor, error)

func (*TrustedAdvisor) Collect

func (t *TrustedAdvisor) Collect(ch chan<- prometheus.Metric) error

func (*TrustedAdvisor) Describe

func (t *TrustedAdvisor) Describe(ch chan<- *prometheus.Desc) error

type TrustedAdvisorConfig

type TrustedAdvisorConfig struct {
	Helper *helper
	Logger micrologger.Logger
}

type Update added in v1.4.0

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

func NewUpdate added in v1.4.0

func NewUpdate(config UpdateConfig) (*Update, error)

func (*Update) Collect added in v1.4.0

func (np *Update) Collect(ch chan<- prometheus.Metric) error

func (*Update) Describe added in v1.4.0

func (np *Update) Describe(ch chan<- *prometheus.Desc) error

type UpdateConfig added in v1.4.0

type UpdateConfig struct {
	Helper *helper
	Logger micrologger.Logger
}

type VPC

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

func NewVPC

func NewVPC(config VPCConfig) (*VPC, error)

func (*VPC) Collect

func (v *VPC) Collect(ch chan<- prometheus.Metric) error

func (*VPC) Describe

func (v *VPC) Describe(ch chan<- *prometheus.Desc) error

type VPCConfig

type VPCConfig struct {
	Helper *helper
	Logger micrologger.Logger

	InstallationName string
}

Jump to

Keyboard shortcuts

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