This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label_replace(group(alertmanager_build_info), "vendor_name", "alertmanager", "", "") | |
or | |
label_replace(group(elasticsearch_cluster_health_status), "vendor_name", "elasticsearch_exporter", "", "") | |
or | |
label_replace(group(flask_exporter_info), "vendor_name", "flask", "", "") | |
or | |
label_replace(group(fluentbit_build_info), "vendor_name", "fluent_bit", "", "") | |
or | |
label_replace(group(fluentd_input_status_num_records_total), "vendor_name", "fluentd", "", "") | |
or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested with OpenTelemetry Collector Contrib v0.88.0 | |
receivers: | |
otlp: | |
# https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver | |
protocols: | |
grpc: | |
http: | |
hostmetrics: | |
# Optional. Host Metrics Receiver added as an example of Infra Monitoring capabilities of the OpenTelemetry Collector | |
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Global tags can be specified here in key="value" format. | |
[global_tags] | |
dc = "us-east-1" # will tag all metrics with dc=us-east-1 | |
rack = "1a" | |
user = "$USER" | |
# Configuration for telegraf agent | |
[agent] | |
## Default data collection interval for all inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"net/url" | |
"time" | |
config_util "github.com/prometheus/common/config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ cortex git:(master) ✗ go test -cover ./... | |
ok github.com/cortexproject/cortex/cmd/cortex (cached) coverage: 67.6% of statements | |
ok github.com/cortexproject/cortex/cmd/query-tee (cached) coverage: 68.3% of statements | |
? github.com/cortexproject/cortex/cmd/test-exporter [no test files] | |
? github.com/cortexproject/cortex/integration [no test files] | |
? github.com/cortexproject/cortex/integration/e2e [no test files] | |
? github.com/cortexproject/cortex/integration/e2e/cache [no test files] | |
? github.com/cortexproject/cortex/integration/e2e/db [no test files] | |
? github.com/cortexproject/cortex/integration/e2e/images [no test files] | |
? github.com/cortexproject/cortex/integration/e2ecortex [no test files] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
kitlog "github.com/go-kit/kit/log" | |
) | |
func main() { | |
logger := kitlog.NewLogfmtLogger(kitlog.NewSyncWriter(os.Stdout)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io/ioutil" | |
"os" | |
"time" | |
"github.com/go-kit/kit/log" | |
"github.com/prometheus/tsdb" | |
"github.com/prometheus/tsdb/labels" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"time" | |
"github.com/prometheus/tsdb" | |
"github.com/prometheus/tsdb/labels" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"sync/atomic" | |
) | |
type sample struct { | |
t int64 | |
v float64 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 The Prometheus Authors | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
NewerOlder