Documentation ¶
Index ¶
- Variables
- func PromString(text string) string
- func PromStringTag(text string, labelsSnakeCase bool) (bool, string)
- type PrometheusCollector
- type PrometheusMetric
- func BuildMetrics(cwd []*model.CloudwatchData, labelsSnakeCase bool, logger logging.Logger) ([]*PrometheusMetric, map[string]model.LabelSet, error)
- func BuildNamespaceInfoMetrics(tagData []*model.TaggedResource, metrics []*PrometheusMetric, ...) ([]*PrometheusMetric, map[string]model.LabelSet)
- func EnsureLabelConsistencyAndRemoveDuplicates(metrics []*PrometheusMetric, observedMetricLabels map[string]model.LabelSet) []*PrometheusMetric
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CloudwatchAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_requests_total", Help: "Help is not implemented yet.", }) CloudwatchAPIErrorCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_request_errors", Help: "Help is not implemented yet.", }) CloudwatchGetMetricDataAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_getmetricdata_requests_total", Help: "Help is not implemented yet.", }) CloudwatchGetMetricStatisticsAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_getmetricstatistics_requests_total", Help: "Help is not implemented yet.", }) ResourceGroupTaggingAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_resourcegrouptaggingapi_requests_total", Help: "Help is not implemented yet.", }) AutoScalingAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_autoscalingapi_requests_total", Help: "Help is not implemented yet.", }) TargetGroupsAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_targetgroupapi_requests_total", Help: "Help is not implemented yet.", }) APIGatewayAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_apigatewayapi_requests_total", }) APIGatewayAPIV2Counter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_apigatewayapiv2_requests_total", }) Ec2APICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_ec2api_requests_total", Help: "Help is not implemented yet.", }) ManagedPrometheusAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_managedprometheusapi_requests_total", Help: "Help is not implemented yet.", }) StoragegatewayAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_storagegatewayapi_requests_total", Help: "Help is not implemented yet.", }) DmsAPICounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_dmsapi_requests_total", Help: "Help is not implemented yet.", }) DuplicateMetricsFilteredCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "yace_cloudwatch_duplicate_metrics_filtered", Help: "Help is not implemented yet.", }) )
View Source
var Percentile = regexp.MustCompile(`^p(\d{1,2}(\.\d{0,2})?|100)$`)
Functions ¶
func PromString ¶
Types ¶
type PrometheusCollector ¶
type PrometheusCollector struct {
// contains filtered or unexported fields
}
func NewPrometheusCollector ¶
func NewPrometheusCollector(metrics []*PrometheusMetric) *PrometheusCollector
func (*PrometheusCollector) Collect ¶
func (p *PrometheusCollector) Collect(metrics chan<- prometheus.Metric)
func (*PrometheusCollector) Describe ¶
func (p *PrometheusCollector) Describe(_ chan<- *prometheus.Desc)
type PrometheusMetric ¶
type PrometheusMetric struct { Name *string Labels map[string]string Value *float64 IncludeTimestamp bool Timestamp time.Time }
func BuildMetrics ¶ added in v0.51.0
func BuildMetrics(cwd []*model.CloudwatchData, labelsSnakeCase bool, logger logging.Logger) ([]*PrometheusMetric, map[string]model.LabelSet, error)
func BuildNamespaceInfoMetrics ¶ added in v0.51.0
func BuildNamespaceInfoMetrics(tagData []*model.TaggedResource, metrics []*PrometheusMetric, observedMetricLabels map[string]model.LabelSet, labelsSnakeCase bool, logger logging.Logger) ([]*PrometheusMetric, map[string]model.LabelSet)
func EnsureLabelConsistencyAndRemoveDuplicates ¶ added in v0.51.0
func EnsureLabelConsistencyAndRemoveDuplicates(metrics []*PrometheusMetric, observedMetricLabels map[string]model.LabelSet) []*PrometheusMetric
EnsureLabelConsistencyAndRemoveDuplicates ensures that every metric has the same set of labels based on the data in observedMetricLabels and that there are no duplicate metrics. Prometheus requires that all metrics with the same name have the same set of labels and that no duplicates are registered
Click to show internal directories.
Click to hide internal directories.