Commit graph

1075 commits

Author SHA1 Message Date
Joe Adams
bfc7e9c4ff
Merge pull request #19037 from lohitkolluri/fix/issue-6092-aws-sd-region-validation
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for 32-bit x86 (push) Waiting to run
CI / List active LTS releases (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Blocked by required conditions
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Blocked by required conditions
CI / Build Prometheus for all architectures (push) Blocked by required conditions
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
govulncheck / Run govulncheck (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
discovery/aws: defer region resolution from YAML parsing to SD init
2026-07-12 22:04:06 -04:00
Vishal More
1364c882c6
promtool: add promql-binop-fill-modifiers to --enable-feature handling (#19153)
Signed-off-by: vishal <httpsvishal07@gmail.com>
2026-07-13 10:57:05 +10:00
Lohit Kolluri
bbe5ba8dd9
discovery/aws: defer region resolution from YAML parsing to SD init
Defer AWS region lookup from UnmarshalYAML to each discovery's client
init so config-only operations (e.g. promtool check config) do not
contact IMDS when the region field is omitted. Resolution errors
surface at the first target refresh instead of during YAML parsing.

Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
2026-07-08 12:11:39 +05:30
Steffen Baarsgaard
9a6814cdfb
promtool: Add --remote-write.path for overriding push metrics url path (#19086)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for 32-bit x86 (push) Waiting to run
CI / List active LTS releases (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Blocked by required conditions
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Blocked by required conditions
CI / Build Prometheus for all architectures (push) Blocked by required conditions
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
govulncheck / Run govulncheck (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* feat(promtool): Add flag --remote-write.path=/api/v1/write
* docs(promtool): Generate cli docs for new flag

Signed-off-by: Steffen Baarsgaard <steff.bpoulsen@gmail.com>
Co-authored-by: Varsha U N <varshaun58@gmail.com>
2026-07-06 16:31:44 +10:00
Julien Pivotto
b4741eeb99
promql: promote first_over_time to stable
Remove the Experimental flag from first_over_time and move it into the
stable *_over_time function lists in the docs and UI function reference.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-07-03 16:44:27 +02:00
Julien
c8739b0766
Merge pull request #19074 from roidelapluie/roidelapluie/lts-split
ci: run version upgrade test as a per-LTS matrix
2026-07-02 12:47:27 +02:00
Julien Pivotto
827d0f9ad3
ci: run version upgrade test as a per-LTS matrix
Fan out the upgrade/downgrade test over each active LTS release so the
matrix jobs run in parallel and a single release failure does not mask
the others. A new list_lts_releases job reads the active LTS versions
from prometheus.io/download.json and feeds them to the matrix.

Add a --test.lts-version flag so TestVersionUpgrade can be restricted to
a single LTS release; when empty, all active LTS releases are tested.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-07-02 12:28:12 +02:00
Matthieu MOREL
e098647095 chore: fix unnecessary-format issues from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-01 07:08:20 +00:00
Carrie Edwards
abb5a2f947
Add histogram chunk encoding with Start Timestamp support (#18609)
* Add histogram chunk encoding with Start Timestamp support

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Update documentation

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Add more tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix for appendHistogram

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Linting

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix start timestamp for histogram samples in TestCompactingChunkSeriesMerger

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Refactor and reduce code duplication

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Move counter reset hint bits into sample count field

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix bug with counter reset header

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Clean up docs

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Address feedback

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Lint

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Refactor to use generic appenders

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Update to include changes to histogram appenders

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Address feedback

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* tsdb: add histograms-st-encoding feature flag (#18912)

* tsdb: add histograms-st-encoding feature flag

Decouple the ST-capable histogram chunk encodings (EncHistogramST,
EncFloatHistogramST) from the xor2-encoding feature flag and gate them
behind a new histograms-st-encoding flag instead. Previously
--enable-feature=xor2-encoding turned on both the float XOR2 encoding
and the histogram ST encodings via a single useXOR2 boolean; that
conflated two independent on-disk formats and made it impossible to opt
into one without the other.

ValueType.ChunkEncoding and NewChunk now take separate useXOR2 and
useHistogramST flags. Dispatch only consumes the relevant flag per
value type; data-driven callers that gate on actual ST presence in the
samples (storage/series.go, tsdb/querier.go, tsdb/chunks/chunks.go)
pass hasST for both. tsdb.Options gains EnableHistogramSTEncoding;
tsdb.HeadOptions gains a matching atomic.Bool. The new flag is
propagated through chunkOpts/headAppenderBase and read at every site
that currently reads EnableXOR2Encoding (head append v1/v2, head_wal
WAL/WBL replay, ooo_head_read).

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>

* Address feedback

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix histogram tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix histogram ST PromQL tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fixes for promQL tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

---------

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-06-30 10:30:29 -07:00
Julien
df59a1a981
Merge pull request #19039 from roidelapluie/roidelapluie/xor2-tsdb-flag
tsdb: gate XOR2 float encoding behind XOR2EncodingAllowed
2026-06-30 14:19:03 +02:00
Julien Pivotto
c6215437f2
tsdb: gate XOR2 float encoding behind XOR2EncodingAllowed
Add an explicit XOR2EncodingAllowed option that gates whether the XOR2
float chunk encoding may be used at all, either as the FloatChunkEncoding
default or via chunk_encoding.floats in the configuration file. This keeps
the enable/disable switch separate from FloatChunkEncoding, which selects
the active default, so callers (e.g. multi-tenant setups) can make XOR2
available without making it the default.

The xor2-encoding feature flag now sets XOR2EncodingAllowed, validateOpts
rejects an EncXOR2 default when it is not allowed, and ApplyConfig checks
the gate rather than the current default. This replaces the
Head.SetFloatChunkEncoding setter approach.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-06-30 12:41:42 +02:00
Julien Pivotto
352e36a760
promql: enable duration expressions by default
Duration expressions no longer require the promql-duration-expr feature
flag, which is now a no-op in both prometheus and promtool. The parser
option (ExperimentalDurationExpr) is kept and enabled by default in the
binaries, so downstream consumers of the parser can still keep it off.

Move the documentation from the feature flags page into the PromQL
querying basics.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-06-29 14:32:14 +02:00
Julien
30355e7947
Merge pull request #18919 from amaanx86/main
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for 32-bit x86 (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Blocked by required conditions
CI / Build Prometheus for all architectures (push) Blocked by required conditions
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
govulncheck / Run govulncheck (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
discovery/oci: add native Oracle Cloud Infrastructure service discovery
2026-06-29 12:17:28 +02:00
Julien Pivotto
8f767b3d6f test(cmd/prometheus): source LTS releases from download.json
Replace the two-source LTS discovery (docs-config.ts regex plus the
GitHub releases API) with a single fetch of prometheus.io/download.json,
which carries the LTS flag and per-OS/arch download URLs. The manifest
can mark more than one release as LTS, so fetch all of them and exercise
each as its own subtest.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-06-17 15:52:25 +02:00
Michael Hoffmann
143643b563 scrape: add more native-histogram related internal labels
This is a followup to our previous commit where we made convert_classic_histograms_to_nhcb
configurable at discovery time. We add the other native histogram labels
too here.

Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
2026-06-15 13:17:46 +00:00
Amaan Ul Haq Siddiqui
fa047cb5eb
test(cmd/prometheus): add oci to TestFeaturesAPI golden file
Signed-off-by: Amaan Ul Haq Siddiqui <amaanulhaq.s@outlook.com>
2026-06-13 17:01:18 +05:00
Julien
aa778345be
Merge pull request #18769 from roidelapluie/roidelapluie/xor2-reload
tsdb: add chunk_encoding config field for runtime encoding selection
2026-06-12 13:50:11 +02:00
Julien Pivotto
350685bade tsdb: add chunk_encoding config field for runtime encoding selection
--enable-feature=xor2-encoding sets tsdb.Options.FloatChunkEncoding to
EncXOR2 (a concrete encoding value, not a feature-flag bool). ApplyConfig
uses this as the fallback when chunk_encoding.floats is absent. No global
mutable state is introduced in the config package.

Signed-off-by: Julien Pivotto <julien.pivotto@grafana.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-06-11 16:45:30 +02:00
kigland
f6dae733c5 promtool: fix check healthy/ready failing with trailing slash in URL
CheckServerStatus built the request URL by concatenating the
user-provided URL with the endpoint path:

    serverURL.String() + checkEndpoint

When the URL ends with a slash (e.g. "http://localhost:9090/"), this
produces a doubled slash like "http://localhost:9090//-/healthy". The
Prometheus router registers "/-/healthy" and "/-/ready" exactly and
does not collapse repeated slashes, so the request 404s and
"promtool check healthy" / "promtool check ready" fail.

Use url.JoinPath to append the endpoint, which normalises the slash and
also handles a configured route prefix correctly. JoinPath returns a new
URL, so the original is left untouched for the error message.

Signed-off-by: kigland <shuaizhicheng336@gmail.com>
2026-06-04 18:29:00 +08:00
Michael Hoffmann
05d9bd4a27
scrape: add __convert_classic_histograms_to_nhcb__ internal label (#18840)
Adding this as a meta label makes it possible to dynamically configure
this setting through discovery labels.
This helps in usecases like K8S where we could enable this with a pod
annotation.

Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
2026-06-03 13:11:21 +00:00
Julien
aa260fcde5
Merge pull request #18687 from roidelapluie/roidelapluie/greatest_least
Duration expression: Rename min/max -> min_of, max_of
2026-05-21 10:34:29 +02:00
Julien
e1f4380b2a
web/api: add search API endpoint (#18573)
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-05-19 13:58:00 +02:00
Julien Pivotto
a74f0b2e7a PromQL: Rename greatest, least, to max_of, min_of.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-05-19 13:07:16 +02:00
Julien Pivotto
7af21f195c promql: add least() and greatest() scalar functions
Implement least(a, b) and greatest(a, b) as scalar-returning PromQL
functions backed by math.Min and math.Max respectively.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-05-18 11:15:31 +02:00
Ridwan Sharif
d7d7f03e57 chore: address PR comments
Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>
2026-05-14 10:28:11 +01:00
Ridwan Sharif
cab74902a2 feat: Add start timestamp synthesis for cumulative metrics in the scrape path.
Issue https://github.com/prometheus/prometheus/issues/14763

Note: Still a WIP for native histograms and summaries.

Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>
2026-05-14 10:28:11 +01:00
Julien Pivotto
7b29b912e3 Revert "PromQL: Promote duration expressions as stable"
This reverts commit 1463a5bb5a.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-05-13 09:59:50 +02:00
Julien Pivotto
fc4d0af37a cmd/prometheus: allow retention percentage with new data path
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-05-06 15:27:32 +02:00
Julien Pivotto
cdf0184419 Promote auto-reload-config stable
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-05-04 15:14:54 +02:00
Julien
e48be9d71a
Merge pull request #18575 from roidelapluie/roidelapluie/duration-expression-stable
PromQL: Promote duration expressions as stable
2026-04-27 14:46:08 +02:00
Denys Sedchenko
ca578101af
feat(tsdb/agent): Implement checkpoint based on series in memory (#17948)
Some checks failed
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests for Prometheus upgrades and downgrades (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
govulncheck / Run govulncheck (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Adds CheckpointFromInMemorySeries option for agent.Options to enable a faster checkpoint implementation that skips segment re-read and just uses in-memory data instead.

* feat: impl agent-specific checkpoint dir
* feat: impl ActiveSeries interface
* feat: use new checkpoint impl
* feat: hide new checkpoint impl behind a feature flag
* feat: add benchmark
* feat: add benchstat case
* feat: use feature flag in bench
* feat: use same labels for persisted state and append
* feat: set WAL segment size
* feat: add checkpoint size metric and bump series size
* feat: wal replay test
* feat: expose new checkpoint opts in cmd flags
* feat: update cli doc
* add ActiveSeries and DeletedSeries doc

Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
Signed-off-by: Denys Sedchenko <9203548+x1unix@users.noreply.github.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-04-24 19:42:26 +02:00
Julien Pivotto
1463a5bb5a PromQL: Promote duration expressions as stable
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-24 18:45:09 +02:00
Vilius Pranckaitis
321fe34aab
PromQL: use start timestamps for rate()-like calculations (#18344)
* PromQL: use start timestamps for rate() and increase() calculations

* implement start timestamps reset detection for `irate()`
* add `start_timestamps.test`
* add a couple of tests with subqueries
* add a test for cumulative with unknown start timestamp
* update `enable-features` CLI parameter description
* `make cli-documentation`

Signed-off-by: vpranckaitis <vpranckaitis@gmail.com>

---------

Signed-off-by: Vilius Pranckaitis <vpranckaitis@gmail.com>
Signed-off-by: vpranckaitis <vpranckaitis@gmail.com>
2026-04-21 17:43:40 +02:00
GeorgeTyupin
e0ea05665a
cmd/prometheus: add default values for agent min/max retention flags (#18261)
* cmd/prometheus: add default values for agent min/max retention flags

Signed-off-by: GeorgeTyupin <GeorgyTyupin@ya.ru>

* docs: update command-line flags documentation

Signed-off-by: GeorgeTyupin <GeorgyTyupin@ya.ru>

* chore: trigger CI (retry 4)

Signed-off-by: GeorgeTyupin <GeorgyTyupin@ya.ru>

* Reuse db.go constants for agent retention flags to avoid duplication.

Signed-off-by: GeorgeTyupin <GeorgyTyupin@ya.ru>

---------

Signed-off-by: GeorgeTyupin <GeorgyTyupin@ya.ru>
2026-04-21 13:22:15 +02:00
Ayoub Mrini
83962c35a4
test(cmd/prometheus): add TestFeatureFlagsDocumented and adjust --enable-feature description (#18487)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* test(cmd/prometheus): add TestFeatureFlagsDocumented and fix help text

Add TestFeatureFlagsDocumented to ensure the --enable-feature help text
in and docs/feature_flags.md list the same set of flags.

The help text was out of sync with the documentation:
- Flags present in docs but missing from help text: `auto-reload-config`,
  `metadata-wal-records`, `otlp-native-delta-ingestion`,
  `promql-delayed-name-removal`, `type-and-unit-labels`. Added them.
- Flags present in help text but missing from docs: `auto-gomaxprocs`,
  `expand-external-labels`. Removed them.

The help text is now sorted for better readability and kept in sync
with the documentation.

Also, the parsing of an empty `--enable-feature` was changed to
print `msg="Unknown option for --enable-feature" option=""` instead of nothing.

Signed-off-by: Ayoub Mrini <ayoubmrini424@gmail.com>

* main.go remove default for --enable-feature to avoid unwanted

Signed-off-by: Ayoub Mrini <ayoubmrini424@gmail.com>

---------

Signed-off-by: Ayoub Mrini <ayoubmrini424@gmail.com>
2026-04-20 16:08:42 +02:00
Julien
5d0bc055ef
Merge pull request #17877 from roidelapluie/roidelapluie/funcs
PromQL: Add start() end() range() and step() functions
2026-04-17 13:51:37 +02:00
Julien Pivotto
ae9e52c868 PromQL: Add start() end() range() and step() functions
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-16 10:59:23 +02:00
mishraa-G
a6ffcaa352
rulefmt: warn when multi-document rule files are detected (#18114)
Signed-off-by: Divyansh Mishra <divyanshmishra@Divyanshs-MacBook-Air-3.local>
Co-authored-by: Divyansh Mishra <mishraa-G@users.noreply.github.com>
Co-authored-by: Divyansh Mishra <divyanshmishra@Divyanshs-MacBook-Air-3.local>
2026-04-09 14:40:18 +02:00
Bryan Boreham
e58f16abc6
Merge pull request #18418 from saikocat/promtool-query-instant-header
promtool: add --header flag to query instant command
2026-04-07 12:23:01 +01:00
Ayoub Mrini
51a5b38b40
Merge pull request #18335 from machine424/ffrtt
test(TestRemoteWrite_ReshardingWithoutDeadlock): remove t.Skip() added by mistake
2026-04-03 12:48:42 +02:00
Hoa
7c0801a926 promtool: add --header flag to query instant command
The `--header` flag was already supported by `promtool query range` but was
missing from `promtool query instant`. This adds the same flag so users can
pass extra HTTP headers (e.g. `X-Scope-OrgID` for multi-tenant setups)
without needing to create an `--http.config.file`.

```
[ENHANCEMENT] promtool: Add `--header` flag to `query instant` command, matching existing `query range` behaviour.
```

Signed-off-by: Hoa <hoameomu@gmail.com>
2026-04-01 17:10:56 +08:00
Ayoub Mrini
71be0ff0ba
Merge pull request #16550 from machine424/changever-e2e
Some checks failed
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Push README to Docker Hub / Push README to Docker Hub (push) Has been cancelled
Push README to Docker Hub / Push README to quay.io (push) Has been cancelled
Add e2e upgrade testing utils and LTS upgrade/downgrade test
2026-03-31 16:31:55 +00:00
Aurélien Duboc
fa5960bf08
feat(discovery): add Outscale VM service discovery (#18139)
Add Outscale VM service discovery using osc-sdk-go, including optional secret_key_file support, metrics, docs, and configuration examples. Document the default region (eu-west-2).

Signed-off-by: Aurelien Duboc <aurelienduboc96@gmail.com>
2026-03-31 18:03:51 +02:00
Julien Pivotto
05721a85d7 cmd/prometheus: fix flaky TestQueryLog console test
- Use an absolute path for the console templates directory to align with rules.
- Rewrite waitForPrometheus using require.Eventually for cleaner
  error reporting and to fix a bug where the function could return nil
  even when the server never became ready.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-30 09:55:36 +02:00
Julien Pivotto
3856195bb8 tsdb: use float64 for retention percentage
The retention.percentage config field was typed as uint, which silently
truncated fractional values. Setting percentage: 1.5 in prometheus.yml
resulted in a retention of 1%, with no warning or error.

Remove the redundant MaxPercentage > 100 clamp in main.go; the config
UnmarshalYAML already returns an error for out-of-range values before
this code is reached.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-26 12:39:22 +01:00
machine424
357a58dea1
test(TestRemoteWrite_ReshardingWithoutDeadlock): remove t.Skip() added by mistake during release-3.8->main sync https://github.com/prometheus/prometheus/pull/17634
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2026-03-26 10:41:42 +01:00
Pierluigi Lenoci
afe0547899
promtool: redirect debug output to stderr (#18346)
The debug flag in `promtool test rules` writes diagnostic output
using fmt.Printf to stdout, which can interfere with machine-parseable
output (e.g. JUnit XML via --junit-output) and piped workflows.

Redirect all DEBUG lines to stderr using fmt.Fprintf(os.Stderr, ...),
consistent with the existing error output pattern already present in
the file (line 78).

Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
2026-03-24 12:12:54 +01:00
Rushabh Mehta
df61021436
tsdb: Add series_state.json file to wal/ directory to track state (#18303)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* Add series_state.json file creation and updation logic.

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Make comments follow the guidelines.

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Fix linter complaints

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Put PR behind feature flag fast-startup

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Marshal updated information to file directly

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Fix linter failures

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Move series state code from head.go to head_wal.go

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Fix nits

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

* Add unit test

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>

---------

Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>
2026-03-23 20:46:04 -07:00
Julien
16876bab95
Merge pull request #18200 from roidelapluie/roidelapluie/retention-validation
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Multiple fixes in retention configuration
2026-03-20 12:27:37 +01:00
Julien Pivotto
1064c26da2 Log retention changes
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-19 17:21:45 +01:00