exporter

package
v0.0.0-...-65d3fc0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Exporter implements the prometheus.Exporter interface, and exports AWS AutoScaling metrics.

func NewExporter

func NewExporter(region string, groups []string, recommenderUrl string) (*Exporter, error)

NewExporter returns a new exporter of AWS Autoscaling group metrics.

func (*Exporter) Collect

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

Collect fetches info from the AWS API and the BanzaiCloud recommendation API

func (*Exporter) Describe

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

Describe outputs metric descriptions.

type GroupScrapeResult

type GroupScrapeResult struct {
	Name             string
	Value            float64
	AutoScalingGroup string
	Region           string
}

type InstanceScrapeResult

type InstanceScrapeResult struct {
	Name             string
	Value            float64
	AutoScalingGroup string
	Region           string
	InstanceId       string
	AvailabilityZone string
	InstanceType     string
}

type InstanceTypeRecommendation

type InstanceTypeRecommendation struct {
	InstanceTypeName   string `json:"InstanceTypeName"`
	CurrentPrice       string `json:"CurrentPrice"`
	AvgPriceFor24Hours string `json:"AvgPriceFor24Hours"`
	OnDemandPrice      string `json:"OnDemandPrice"`
	SuggestedBidPrice  string `json:"SuggestedBidPrice"`
	CostScore          string `json:"CostScore"`
	StabilityScore     string `json:"StabilityScore"`
}

type Recommendation

type Recommendation map[string][]InstanceTypeRecommendation

Jump to

Keyboard shortcuts

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