prometheus
prometheus copied to clipboard
Promtool: add http config support to query commands
Hi,
as a followup to the previous PR from Alertmanager https://github.com/prometheus/alertmanager/pull/2764 and stale PR for promtool https://github.com/prometheus/prometheus/pull/8082
This PR adds support for HTTP config using the promconfig common package same as amtool does for query subcommands.
Works just fine, tested with base auth and bearer token.
@roidelapluie would you mind taking a look since you were actibe in both above linked PRs? :pray:
@dgl would you find a second to review please?:pray:
Can we move this code to Prometheus/common?
Can we move this code to Prometheus/common?
Which part of the code do you exactly mean to move to the common? The amconfig.LoadHTTPConfigFile
?
yes please
Actually it appears the function is already there, just in the test files and not used, nor by Alertmanager or Prometheus itself. Alertmanager has one additional line in that function, not sure hot to deal with this difference.
PR here https://github.com/prometheus/common/pull/415
Switched to prometheus/common as agreed after https://github.com/prometheus/common/pull/415
Rebased, @roidelapluie friendly bump if you would find awhile :pray:
Rebased again
Rebased, fuzzing seems to be flaky?
Fuzzing issue #11810
Would you consider including tsdb create-blocks-from rules
, which also performs queries ?
(no pressure, just asking)
I have a basic version of tsdb create-blocks-from rules
working here: https://github.com/Pokom/prometheus/commit/94094bf176f612276f1cc62dfb51d785df8ba7f4. For the first pass I opted to get the code working where the flag isn't shared between the two subcommands.
If FUSAKLA isn't keen to implement the feature in this PR, I'd be more then happy to follow up with a PR to implement it.
Hi, sorry for delay. Sure, I'll add the support event for the tsdb create-blocks-from rules
.
@bboreham PTAL
@roidelapluie friendly bump once again :pray:
The failing CI seems weird once again :thinking:
The issues with go mod seems to be unrelated or at least unintentional.. whole make
and tests passes locally
can you run go mod tidy?
I ran it multiple times locally (go 1.19) and in container (official 1.18) with no changes :thinking:
Running whole make
passes
I'm not able to reproduce anyhow locally the issues CI bumps into.
My changed does not change any dependencies, so I do not see reason for it to change to cause changes in go.mod
or go.sum
:/
I think there is some general issue with CI - I've seen these error messages on other PRs. Didn't yet figure out what the issue is.
I suspected bump in the golang-builder on Go 1.20, but that seems also not to be an issue… :thinking: Might be worth trying to run on main branch to see if it fails only on branches, seeing other PRs with the same issues as Bryan sated
:tada: rebased on master and CI passes..
@roidelapluie Would you take a look :pray:
Hi, sorry for delay. Sure, I'll add the support event for the tsdb create-blocks-from rules.
Does not seem to be done
Should be fixed now :crossed_fingers:
Thanks!
Thank you! :tada: