-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #788 from cloudflare/discovery
Swich to git branch discovery
- Loading branch information
Showing
31 changed files
with
413 additions
and
931 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
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
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
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 was deleted.
Oops, something went wrong.
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
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,108 @@ | ||
http response prometheus /api/v1/metadata 200 {"status":"success","data":{}} | ||
http response prometheus /api/v1/status/config 200 {"status":"success","data":{"yaml":"global:\n scrape_interval: 30s\n"}} | ||
http response prometheus /api/v1/status/flags 200 {"status":"success","data":{"storage.tsdb.retention.time": "1d"}} | ||
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":[]}} | ||
http start prometheus 127.0.0.1:7160 | ||
|
||
mkdir testrepo | ||
cd testrepo | ||
exec git init --initial-branch=main . | ||
|
||
cp ../src/v0.yml rules.yml | ||
cp ../src/.pint.hcl . | ||
env GIT_AUTHOR_NAME=pint | ||
env GIT_AUTHOR_EMAIL=pint@example.com | ||
env GIT_COMMITTER_NAME=pint | ||
env GIT_COMMITTER_EMAIL=pint@example.com | ||
exec git add . | ||
exec git commit -am 'import rules and config' | ||
|
||
exec git checkout -b v1 | ||
cp ../src/v1.yml rules.yml | ||
exec git commit -am 'v1' | ||
pint.ok --no-color ci | ||
cmp stderr ../stderrV1.txt | ||
|
||
exec git checkout main | ||
exec git merge v1 | ||
|
||
exec git checkout -b v2 | ||
cp ../src/v2.yml rules.yml | ||
exec git commit -am 'v2' | ||
pint.error --no-color ci | ||
! stdout . | ||
cmp stderr ../stderrV2.txt | ||
|
||
-- stderrV1.txt -- | ||
level=INFO msg="Loading configuration file" path=.pint.hcl | ||
level=INFO msg="Finding all rules to check on current git branch" base=main | ||
level=INFO msg="Configured new Prometheus server" name=prom uris=1 uptime=up tags=[] include=[] exclude=[] | ||
-- stderrV2.txt -- | ||
level=INFO msg="Loading configuration file" path=.pint.hcl | ||
level=INFO msg="Finding all rules to check on current git branch" base=main | ||
level=INFO msg="Configured new Prometheus server" name=prom uris=1 uptime=up tags=[] include=[] exclude=[] | ||
level=WARN msg="No results for Prometheus uptime metric, you might have set uptime config option to a missing metric, please check your config" name=prom metric=up | ||
level=WARN msg="Using dummy Prometheus uptime metric results with no gaps" name=prom metric=up | ||
level=WARN msg="No results for Prometheus uptime metric, you might have set uptime config option to a missing metric, please check your config" name=prom metric=up | ||
level=WARN msg="Using dummy Prometheus uptime metric results with no gaps" name=prom metric=up | ||
level=INFO msg="Problems found" Bug=2 | ||
rules.yml:8 Bug: `prom` Prometheus server at http://127.0.0.1:7160 didn't have any series for `up` metric in the last 1w. (promql/series) | ||
8 | expr: up == 0 | ||
|
||
rules.yml:16 Bug: `prom` Prometheus server at http://127.0.0.1:7160 didn't have any series for `up` metric in the last 1w. (promql/series) | ||
16 | expr: up == 0 | ||
|
||
level=ERROR msg="Fatal error" err="problems found" | ||
-- src/v0.yml -- | ||
groups: | ||
- name: g1 | ||
rules: [] | ||
-- src/v1.yml -- | ||
groups: | ||
- name: g1 | ||
rules: | ||
- alert: DownAlert | ||
# foo | ||
# pint disable promql/series(up) | ||
# bar | ||
expr: up == 0 | ||
annotations: | ||
summary: 'Service is down' | ||
labels: | ||
cluster: dev | ||
- record: up:sum | ||
# foo | ||
# pint disable promql/series(up) | ||
# bar | ||
expr: up == 0 | ||
labels: | ||
cluster: dev | ||
-- src/v2.yml -- | ||
groups: | ||
- name: g1 | ||
rules: | ||
- alert: DownAlert | ||
# foo | ||
# pint disable promql/series(xxx) | ||
# bar | ||
expr: up == 0 | ||
annotations: | ||
summary: 'Service is down' | ||
labels: | ||
cluster: dev | ||
- record: up:sum | ||
# foo | ||
# bar | ||
expr: up == 0 | ||
labels: | ||
cluster: dev | ||
-- src/.pint.hcl -- | ||
ci { | ||
baseBranch = "main" | ||
} | ||
prometheus "prom" { | ||
uri = "http://127.0.0.1:7160" | ||
timeout = "5s" | ||
required = true | ||
} |
Oops, something went wrong.