Documentation ¶
Index ¶
- Constants
- Variables
- func CheckLogGroup() error
- func GetHpaListV2() ([]as_v2.HorizontalPodAutoscaler, error)
- func HpaConditionJsonString(hpa as_v2.HorizontalPodAutoscaler) string
- func MakeAnnotationCondLabels(cond as_v2.HorizontalPodAutoscalerCondition) (prometheus.Labels, prometheus.Labels)
- func MergeLabels(m1, m2 map[string]string) map[string]string
- func ParseCommonMetrics(m commonMetrics) (float64, prometheus.Labels)
- func ParseExternalSpec(m *as_v2.ExternalMetricSource) commonMetrics
- func ParseExternalStatus(m *as_v2.ExternalMetricStatus) commonMetrics
- func ParseObjectSpec(m *as_v2.ObjectMetricSource) commonMetrics
- func ParseObjectStatus(m *as_v2.ObjectMetricStatus) commonMetrics
- func ParsePodsSpec(m *as_v2.PodsMetricSource) commonMetrics
- func ParsePodsStatus(m *as_v2.PodsMetricStatus) commonMetrics
- func ParseResourceSpec(m *as_v2.ResourceMetricSource) commonMetrics
- func ParseResourceStatus(m *as_v2.ResourceMetricStatus) commonMetrics
- func PutHPAConditionToCWLog(hpa []as_v2.HorizontalPodAutoscaler) error
- func ResetAllMetric()
- func ValidateFlags() error
Constants ¶
View Source
const RootDoc = `` /* 131-byte string literal not displayed */
Variables ¶
View Source
var ( HpaCurrentPodsNum = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_current_pods_num", Help: "Number of current pods by status.", }, baseLabels, ) HpaDesiredPodsNum = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_desired_pods_num", Help: "Number of desired pods by status.", }, baseLabels, ) HpaMinPodsNum = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_min_pods_num", Help: "Number of min pods by spec.", }, baseLabels, ) HpaMaxPodsNum = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_max_pods_num", Help: "Number of max pods by spec.", }, baseLabels, ) HpaLastScaleSecond = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_last_scale_second", Help: "Time the scale was last executed.", }, baseLabels, ) HpaCurrentMetricsValue = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_current_metrics_value", Help: "Current Metrics Value.", }, append(baseLabels, metricLabels...), ) HpaTargetMetricsValue = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_target_metrics_value", Help: "Target Metrics Value.", }, append(baseLabels, metricLabels...), ) HpaAbleToScale = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_able_to_scale", Help: "status able to scale from annotation.", }, append(baseLabels, annoLabels...), ) HpaScalingActive = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_scaling_active", Help: "status scaling active from annotation.", }, append(baseLabels, annoLabels...), ) HpaScalingLimited = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "hpa_scaling_limited", Help: "status scaling limited from annotation.", }, append(baseLabels, annoLabels...), ) )
View Source
var Addr = flag.String("listen-address", defaultAddr, "The address to listen on for HTTP requests.")
View Source
var ConditionLogging = flag.Bool("conditionLogging", defaultConditionLogging, "Logging HPA conditions.")
View Source
var LoggingInterval = flag.Int("loggingInterval", defaultLoggingInterval, "Interval to logging HPA conditions.")
View Source
var LoggingTo = flag.String("loggingTo", defaultLoggingTo, "Where to log. (stdout or cwlogs)")
View Source
var MetricsInterval = flag.Int("MetricsInterval", defaultMetricsInterval, "Interval to scrape HPA status.")
Functions ¶
func CheckLogGroup ¶
func CheckLogGroup() error
func GetHpaListV2 ¶
func GetHpaListV2() ([]as_v2.HorizontalPodAutoscaler, error)
func HpaConditionJsonString ¶
func HpaConditionJsonString(hpa as_v2.HorizontalPodAutoscaler) string
func MakeAnnotationCondLabels ¶
func MakeAnnotationCondLabels(cond as_v2.HorizontalPodAutoscalerCondition) (prometheus.Labels, prometheus.Labels)
func ParseCommonMetrics ¶
func ParseCommonMetrics(m commonMetrics) (float64, prometheus.Labels)
func ParseExternalSpec ¶
func ParseExternalSpec(m *as_v2.ExternalMetricSource) commonMetrics
func ParseExternalStatus ¶
func ParseExternalStatus(m *as_v2.ExternalMetricStatus) commonMetrics
func ParseObjectSpec ¶
func ParseObjectSpec(m *as_v2.ObjectMetricSource) commonMetrics
func ParseObjectStatus ¶
func ParseObjectStatus(m *as_v2.ObjectMetricStatus) commonMetrics
func ParsePodsSpec ¶
func ParsePodsSpec(m *as_v2.PodsMetricSource) commonMetrics
func ParsePodsStatus ¶
func ParsePodsStatus(m *as_v2.PodsMetricStatus) commonMetrics
func ParseResourceSpec ¶
func ParseResourceSpec(m *as_v2.ResourceMetricSource) commonMetrics
func ParseResourceStatus ¶
func ParseResourceStatus(m *as_v2.ResourceMetricStatus) commonMetrics
func PutHPAConditionToCWLog ¶
func PutHPAConditionToCWLog(hpa []as_v2.HorizontalPodAutoscaler) error
func ResetAllMetric ¶
func ResetAllMetric()
func ValidateFlags ¶
func ValidateFlags() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.