Skip to content

Commit

Permalink
Add some helpful configs for testing during development
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksontj committed Mar 23, 2023
1 parent 012690f commit 96bd47b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/promxy/Makefile
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions cmd/promxy/demo_robust.conf
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions cmd/promxy/local_test.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
promxy:
server_groups:
- static_configs:
- targets:
- localhost:9090
labels:
dc: 1
- static_configs:
- targets:
- localhost:9090
labels:
dc: 2

0 comments on commit 96bd47b

Please sign in to comment.