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
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
➜ 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
# Telegraf Configuration | |
# Telegraf is entirely plugin driven. All metrics are gathered from the | |
# declared inputs, and sent to the declared outputs. | |
# Plugins must be declared in here to be active. | |
# To deactivate a plugin, comment out the name and any variables. | |
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config | |
# file would generate. |
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 ( | |
"sync/atomic" | |
) | |
type sample struct { | |
t int64 | |
v float64 | |
} |
NewerOlder