Documentation ¶
Index ¶
- func GatherUptime(hs *HelperStruct, _ *Logger.Logger, client aws.MetricClient, name string) (map[string]interface{}, error)
- func GetLoadBalancerRequestCount(hs *HelperStruct, logger *Logger.Logger, client aws.MetricClient, name string) (map[string]interface{}, error)
- func GetTargetGroupRequestCount(hs *HelperStruct, logger *Logger.Logger, client aws.MetricClient, name string) (map[string]interface{}, error)
- type Collector
- func (c Collector) CheckStorage(logger *Logger.Logger) error
- func (c Collector) GetAdditionalMetric(asg string, tgs []*string, lbs []*string, logger *Logger.Logger) (map[string]interface{}, error)
- func (c Collector) StampDeployment(stack schemas.Stack, config schemas.Config, tags []*autoscaling.Tag, ...) error
- func (c Collector) UpdateStatistics(asg string, updateFields map[string]interface{}) error
- func (c Collector) UpdateStatus(asg string, status string, updateFields map[string]interface{}) error
- type HelperStruct
- type TargetMetrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GatherUptime ¶
func GatherUptime(hs *HelperStruct, _ *Logger.Logger, client aws.MetricClient, name string) (map[string]interface{}, error)
GatherUptime gathers uptime information about autoscaling group
func GetLoadBalancerRequestCount ¶
func GetLoadBalancerRequestCount(hs *HelperStruct, logger *Logger.Logger, client aws.MetricClient, name string) (map[string]interface{}, error)
GetLoadBalancerRequestCount retrieves load balancer request count
func GetTargetGroupRequestCount ¶
func GetTargetGroupRequestCount(hs *HelperStruct, logger *Logger.Logger, client aws.MetricClient, name string) (map[string]interface{}, error)
GetTargetGroupRequestCount retrieves target group request count
Types ¶
type Collector ¶
type Collector struct { MetricConfig schemas.MetricConfig MetricClient aws.MetricClient TargetMetricsList []TargetMetrics }
func NewCollector ¶
func NewCollector(mc schemas.MetricConfig, assumeRole string) Collector
NewCollector creates new collector
func (Collector) CheckStorage ¶
CheckStorage is for checking metrics storage
func (Collector) GetAdditionalMetric ¶
func (c Collector) GetAdditionalMetric(asg string, tgs []*string, lbs []*string, logger *Logger.Logger) (map[string]interface{}, error)
GetAdditionalMetric retrieves additional metrics to store
func (Collector) StampDeployment ¶
func (c Collector) StampDeployment(stack schemas.Stack, config schemas.Config, tags []*autoscaling.Tag, asg string, status string, additionalFields map[string]string) error
StampDeployment records deployment information to storage
func (Collector) UpdateStatistics ¶
UpdateStatistics update value of metric table
type HelperStruct ¶
type TargetMetrics ¶
type TargetMetrics struct { // Metric name Name string // Enable Enable bool // Mapping function for metric MappingFunction func(*HelperStruct, *Logger.Logger, aws.MetricClient, string) (map[string]interface{}, error) }
Detailed metric structure
func SetTargetMetrics ¶
func SetTargetMetrics() []TargetMetrics
SetTargetMetrics sets what collector will gather for measurement
Click to show internal directories.
Click to hide internal directories.