forked from cloudflare/pint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TLS options to prometheus config block
Fixes cloudflare#540.
- Loading branch information
Showing
21 changed files
with
521 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,52 @@ | ||
APIs | ||
BitBucket | ||
CLI | ||
Changelog | ||
Cloudflare | ||
Deduplicate | ||
GOGC | ||
GOMAXPROCS | ||
HCL | ||
HTTPS | ||
JSON | ||
PRs | ||
PromQL | ||
Thanos | ||
UI | ||
URI | ||
URIs | ||
YAML | ||
automaxprocs | ||
BitBucket | ||
bool | ||
changelog | ||
Changelog | ||
CLI | ||
cloudflare | ||
Cloudflare | ||
config | ||
Deduplicate | ||
dir | ||
durations | ||
endraw | ||
github | ||
GOGC | ||
golang | ||
GOMAXPROCS | ||
HCL | ||
hoc | ||
hostname | ||
HTTPS | ||
humanize | ||
io | ||
JSON | ||
linter | ||
matcher | ||
matchers | ||
md | ||
nav | ||
prometheus | ||
promql | ||
PromQL | ||
PRs | ||
prymitive | ||
SNI | ||
symlink | ||
symlinked | ||
symlinks | ||
templated | ||
Thanos | ||
TLS | ||
toc | ||
hoc | ||
uber | ||
UI | ||
unmarshal | ||
unmarshall | ||
uptime | ||
URI | ||
URIs | ||
validator | ||
yaml | ||
cloudflare | ||
github | ||
io | ||
YAML |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cert $WORK prom | ||
http response prometheus /api/v1/status/flags 200 {"status":"success","data":{"storage.tsdb.retention.time": "1d"}} | ||
http response prometheus /api/v1/status/config 200 {"status":"success","data":{"yaml":"global:\n scrape_interval: 30s\n"}} | ||
http response prometheus /api/v1/query_range 200 {"status":"success","data":{"resultType":"matrix","result":[]}} | ||
http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} | ||
http start prometheus 127.0.0.1:7129 $WORK/prom.pem $WORK/prom.key | ||
|
||
pint.error -l debug --no-color lint rules | ||
! stdout . | ||
stderr 'tls: failed to verify certificate: x509: certificate signed by unknown authority' | ||
|
||
-- rules/1.yml -- | ||
groups: | ||
- name: foo | ||
rules: | ||
- record: aggregate | ||
expr: sum(foo) without(job) | ||
|
||
-- .pint.hcl -- | ||
prometheus "prom" { | ||
uri = "https://127.0.0.1:7129" | ||
failover = [] | ||
timeout = "5s" | ||
required = true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
cert $WORK prom | ||
http response prometheus /api/v1/status/flags 200 {"status":"success","data":{"storage.tsdb.retention.time": "1d"}} | ||
http response prometheus /api/v1/status/config 200 {"status":"success","data":{"yaml":"global:\n scrape_interval: 30s\n"}} | ||
http response prometheus /api/v1/query_range 200 {"status":"success","data":{"resultType":"matrix","result":[]}} | ||
http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} | ||
http start prometheus 127.0.0.1:7130 $WORK/prom.pem $WORK/prom.key | ||
|
||
pint.ok -l debug --no-color lint rules | ||
! stdout . | ||
! stderr 'tls: failed to verify certificate: x509: certificate signed by unknown authority' | ||
|
||
-- rules/1.yml -- | ||
groups: | ||
- name: foo | ||
rules: | ||
- record: aggregate | ||
expr: sum(foo) without(job) | ||
|
||
-- .pint.hcl -- | ||
prometheus "prom" { | ||
uri = "https://127.0.0.1:7130" | ||
failover = [] | ||
timeout = "5s" | ||
required = true | ||
tls { | ||
caCert = "prom-ca.pem" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
cert $WORK prom | ||
http response prometheus /api/v1/status/flags 200 {"status":"success","data":{"storage.tsdb.retention.time": "1d"}} | ||
http response prometheus /api/v1/status/config 200 {"status":"success","data":{"yaml":"global:\n scrape_interval: 30s\n"}} | ||
http response prometheus /api/v1/query_range 200 {"status":"success","data":{"resultType":"matrix","result":[]}} | ||
http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{},"value":[1666873962.795,"1"]}]}} | ||
http start prometheus 127.0.0.1:7131 $WORK/prom.pem $WORK/prom.key | ||
|
||
pint.ok -l debug --no-color lint rules | ||
! stdout . | ||
! stderr 'tls: failed to verify certificate: x509: certificate signed by unknown authority' | ||
|
||
-- rules/1.yml -- | ||
groups: | ||
- name: foo | ||
rules: | ||
- record: aggregate | ||
expr: sum(foo) without(job) | ||
|
||
-- .pint.hcl -- | ||
prometheus "prom" { | ||
uri = "https://127.0.0.1:7131" | ||
failover = [] | ||
timeout = "5s" | ||
required = true | ||
tls { | ||
skipVerify = true | ||
} | ||
} |
Oops, something went wrong.