Documentation ¶
Index ¶
- Variables
- func GetPriceGatherers() prometheus.Gatherers
- func GetSpotPriceGatherers() prometheus.Gatherers
- func ReportAlibabaSpotPrice(region, zone, instanceType string, price float64)
- func ReportAmazonSpotPrice(region, zone, instanceType string, price float64)
- func ReportAzureSpotPrice(region, instanceType string, price float64)
- func ReportGoogleSpotPrice(region, zone, instanceType string, price float64)
- type DefaultMetricsReporter
- func (ms *DefaultMetricsReporter) ReportScrapeFailure(provider, service, region string)
- func (ms *DefaultMetricsReporter) ReportScrapeProviderCompleted(provider string, startTime time.Time)
- func (ms *DefaultMetricsReporter) ReportScrapeProviderShortLivedCompleted(provider string, startTime time.Time)
- func (ms *DefaultMetricsReporter) ReportScrapeRegionCompleted(provider, service, region string, startTime time.Time)
- func (ms *DefaultMetricsReporter) ReportScrapeRegionShortLivedCompleted(provider, region string, startTime time.Time)
- func (ms *DefaultMetricsReporter) ReportScrapeShortLivedFailure(provider, region string)
- type Reporter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OnDemandPriceGauge collects metrics for the prometheus OnDemandPriceGauge = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "cloudinfo", Name: "on_demand_price", Help: "On demand price for each instance type", }, []string{"provider", "region", "instanceType"}, ) )
Functions ¶
func GetPriceGatherers ¶
func GetPriceGatherers() prometheus.Gatherers
func GetSpotPriceGatherers ¶
func GetSpotPriceGatherers() prometheus.Gatherers
func ReportAlibabaSpotPrice ¶
func ReportAmazonSpotPrice ¶
func ReportAzureSpotPrice ¶
func ReportGoogleSpotPrice ¶
Types ¶
type DefaultMetricsReporter ¶
type DefaultMetricsReporter struct { // Collectors holds application metric collector references for "bulk" operations Collectors []*prometheus.Collector }
DefaultMetricsReporter default metrics source for the application
func (*DefaultMetricsReporter) ReportScrapeFailure ¶
func (ms *DefaultMetricsReporter) ReportScrapeFailure(provider, service, region string)
func (*DefaultMetricsReporter) ReportScrapeProviderCompleted ¶
func (ms *DefaultMetricsReporter) ReportScrapeProviderCompleted(provider string, startTime time.Time)
func (*DefaultMetricsReporter) ReportScrapeProviderShortLivedCompleted ¶
func (ms *DefaultMetricsReporter) ReportScrapeProviderShortLivedCompleted(provider string, startTime time.Time)
func (*DefaultMetricsReporter) ReportScrapeRegionCompleted ¶
func (ms *DefaultMetricsReporter) ReportScrapeRegionCompleted(provider, service, region string, startTime time.Time)
func (*DefaultMetricsReporter) ReportScrapeRegionShortLivedCompleted ¶
func (ms *DefaultMetricsReporter) ReportScrapeRegionShortLivedCompleted(provider, region string, startTime time.Time)
func (*DefaultMetricsReporter) ReportScrapeShortLivedFailure ¶
func (ms *DefaultMetricsReporter) ReportScrapeShortLivedFailure(provider, region string)
type Reporter ¶
type Reporter interface { // ReportScrapeProviderCompleted registers the event of a successful scrape completion ReportScrapeProviderCompleted(provider string, startTime time.Time) // ReportScrapeRegionCompleted registers the completion of a successful scrape for the service, region and provider ReportScrapeRegionCompleted(provider, service, region string, startTime time.Time) // ReportScrapeFailure reports a scraping failure ReportScrapeFailure(provider, service, region string) // ReportScrapeProviderShortLivedCompleted reports a successful short lived information scrape for the provider ReportScrapeProviderShortLivedCompleted(provider string, startTime time.Time) // ReportScrapeRegionShortLivedCompleted reports a successful scrape for short lived information for the given region ReportScrapeRegionShortLivedCompleted(provider, region string, startTime time.Time) // ReportScrapeShortLivedFailure reports the failure of scraping short lived information ReportScrapeShortLivedFailure(provider, region string) }
Defines application specific operations for collecting metrics
func NewDefaultMetricsReporter ¶
func NewDefaultMetricsReporter() Reporter
NewMetricsSource assembles a Reporter with custom collectors
func NewNoOpMetricsReporter ¶
func NewNoOpMetricsReporter() Reporter
Click to show internal directories.
Click to hide internal directories.