From 7654daa832f499ec720febb9e1b6088dd97bdd47 Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Wed, 22 Mar 2023 18:15:02 -0700 Subject: [PATCH] Add some helpful configs for testing during development --- cmd/promxy/Makefile | 9 +++++++++ cmd/promxy/demo_robust.conf | 31 +++++++++++++++++++++++++++++++ cmd/promxy/local_test.conf | 12 ++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 cmd/promxy/Makefile create mode 100644 cmd/promxy/demo_robust.conf create mode 100644 cmd/promxy/local_test.conf diff --git a/cmd/promxy/Makefile b/cmd/promxy/Makefile new file mode 100644 index 000000000..d31037804 --- /dev/null +++ b/cmd/promxy/Makefile @@ -0,0 +1,9 @@ +test-robust: + go build -race -mod=vendor -tags netgo,builtinassets && ./promxy --log-level=debug --http.shutdown-delay=0s --config=demo_robust.conf --web.external-url=http://localhost:8082/promxy + + +test-local: + go build -race -mod=vendor -tags netgo,builtinassets && ./promxy --http.shutdown-delay=0s --config=local_test.conf --web.external-url=http://localhost:8082/promxy --log-level=debug + +version: + go build -race -mod=vendor -tags netgo,builtinassets && ./promxy --version diff --git a/cmd/promxy/demo_robust.conf b/cmd/promxy/demo_robust.conf new file mode 100644 index 000000000..effb1334c --- /dev/null +++ b/cmd/promxy/demo_robust.conf @@ -0,0 +1,31 @@ +## +## Regular prometheus configuration +## +global: + evaluation_interval: 60s + external_labels: + source: promxy + +## +### Promxy configuration +## +promxy: + server_groups: + - static_configs: + - targets: + - demo.robustperception.io:9090 + http_client: + dial_timeout: 1s + tls_config: + insecure_skip_verify: true + labels: + replica: a + - static_configs: + - targets: + - demo.robustperception.io:9090 + http_client: + dial_timeout: 1s + tls_config: + insecure_skip_verify: true + labels: + replica: b diff --git a/cmd/promxy/local_test.conf b/cmd/promxy/local_test.conf new file mode 100644 index 000000000..bf48edf32 --- /dev/null +++ b/cmd/promxy/local_test.conf @@ -0,0 +1,12 @@ +promxy: + server_groups: + - static_configs: + - targets: + - localhost:9090 + labels: + dc: 1 + - static_configs: + - targets: + - localhost:9090 + labels: + dc: 2