Commit graph

1539 commits

Author SHA1 Message Date
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
Jyotishmoy Deka
300b4f495b
web/ui: fix lezer-promql module build on Windows (#18725)
Signed-off-by: jyotishmoy12 <jyotishmoydeka62@gmail.com>
2026-05-19 15:50:28 +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
Bartlomiej Plotka
2a146bce7f
Revert "chore: prepare 3.12.0-rc.0 release" 2026-05-19 08:40:18 +01: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
bwplotka
981aadfb02 make ui-bump-version
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-05-15 11:28:16 +01:00
Asish Kumar
a21f58c2c0
test: expect label value completion apply text
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
2026-05-14 22:13:03 +05:30
Asish Kumar
0254e010b3
Address PromQL autocomplete review feedback
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
2026-05-14 22:11:04 +05:30
Asish Kumar
7c6bab8c58
ui: escape label values in PromQL autocomplete
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
2026-05-14 22:11:04 +05:30
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
Julius Volz
ce93018f4e
Merge pull request #18682 from flying-musk/fix-y-axis-tick-precision
ui: improve y-axis tick precision
2026-05-13 08:00:14 +02:00
Flying Musk
b69f991b57 ui: improve y-axis tick precision
Signed-off-by: Flying Musk <musk.flying@gmail.com>
2026-05-12 16:11:03 -07:00
bwplotka
d36e9114cb chore: Upgrade Go deps
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-05-11 12:10:00 +01:00
renovate[bot]
73844c223f
Update module github.com/prometheus/prometheus to v0.311.3 [SECURITY] 2026-05-11 10:20:11 +00:00
Julien Pivotto
64e465dddc chore: Update NPM deps for 3.12
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-05-08 13:59:50 +02:00
Julien Pivotto
5e4c110c65 Merge branch 'release-3.11' into merge-3.11 2026-04-27 17:11:39 +02:00
Julien Pivotto
5ba3545753 Release 3.11.3
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-27 15:48:10 +02:00
Julius Volz
38f23b9075 ui: fix stored XSS in old UI heatmap chart tick labels
This fixes the stored XSS as described in:

https://github.com/prometheus/prometheus/security/advisories/GHSA-fw8g-cg8f-9j28

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-27 12:28:10 +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
Julien Pivotto
504c5e67ea promql/ui: highlight start()/end()/range()/step() as functions; start()/end() as modifiers only after @
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-17 16:48:54 +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
Julius Volz
34cebfe953
Merge pull request #18411 from prometheus/self-metrics-api
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
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
Add API endpoint for getting Prometheus' metrics about itself
2026-04-15 14:47:38 +02:00
Julien
12de1243c0
Merge pull request #18518 from prometheus/release-3.11
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
Merge back release 3.11.2
2026-04-14 10:26:38 +02:00
Julien Pivotto
f08b9837f9 Release 3.11.2
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-13 13:12:35 +02:00
Julius Volz
d456d314d2 Add some missing metrics protobuf field TypeScript definitions
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 16:06:33 +02:00
Julius Volz
034c29411a Use ProtoJSON, allow regex-based filtering of metric names
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 16:05:40 +02:00
Julius Volz
318c913fe2 Add API endpoint for getting Prometheus' metrics about itself
This adds a /api/v1/status/self_metrics endpoint that allows the frontend to
fetch metrics about the server itself, making it easier to construct frontend
pages that show the current server state. This is needed because fetching
metrics from its own /metrics endpoint would be both hard to parse and also
require CORS permissions on that endpoint (for cases where the frontend
dashboard is not the same origin, at least).

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 16:05:08 +02:00
Julius Volz
fddbccf79b UI: Fix stored XSS via unescaped metric names and labels
Metric names, label names, and label values containing HTML/JavaScript were
inserted into `innerHTML` without escaping in several UI code paths, enabling
stored XSS attacks via crafted metrics. This mostly becomes exploitable in
Prometheus 3.x, since it defaults to allowing any UTF-8 characters in metric
and label names.

Apply `escapeHTML()` to all user-controlled values before innerHTML
insertion in:

* Mantine UI chart tooltip
* Old React UI chart tooltip
* Old React UI metrics explorer fuzzy search
* Old React UI heatmap tooltip

See https://github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-10 11:25:03 +02:00
Julius Volz
07c6232d15
Merge commit from fork
UI: Fix stored XSS via unescaped metric names and labels
2026-04-10 09:30:55 +01:00
Julien
6115f305e2
Merge pull request #18478 from prometheus/release-3.11
Merge back Release 3.11.1
2026-04-09 09:54:44 +02:00
Arve Knudsen
56c6370b26
promql: fix info() handling of negated __name__ matchers (#17932)
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
* promql: fix info() handling of negated __name__ matchers

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-04-08 16:01:27 +00:00
Julien Pivotto
9678641c33 Release 3.11.1
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-07 15:57:30 +02:00
Julius Volz
ce9593598d mantine-ui: migrate from Mantine 8 to 9
See the migration guide at https://mantine.dev/guides/8x-to-9x/

- Update all @mantine/* packages from 8.x to 9.x
- Rename Collapse `in` prop to `expanded` (breaking change)
- Set defaultRadius to 'sm' to preserve v8 appearance
- Manually set stacked/unstacked control font-weight back to 500 again
- Remove custom Accordion fork, use Mantine 9's built-in
  Accordion with `keepMounted={false}` for the same behavior

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-07 10:13:09 +02:00
Julius Volz
a4d5f98f42 UI: Fix stored XSS via unescaped metric names and labels
Metric names, label names, and label values containing HTML/JavaScript were
inserted into `innerHTML` without escaping in several UI code paths, enabling
stored XSS attacks via crafted metrics. This mostly becomes exploitable in
Prometheus 3.x, since it defaults to allowing any UTF-8 characters in metric
and label names.

Apply `escapeHTML()` to all user-controlled values before innerHTML
insertion in:

* Mantine UI chart tooltip
* Old React UI chart tooltip
* Old React UI metrics explorer fuzzy search
* Old React UI heatmap tooltip

See https://github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-04-04 12:19:55 +02:00
Julien
477bbb6b2c
Merge pull request #18435 from prometheus/release-3.11
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
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
Merge release 3.11
2026-04-03 14:11:07 +02:00
Julien Pivotto
9b12b3d226 Release 3.11.0
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-04-02 11:51:49 +02:00
Julius Volz
0545b38c26
Merge pull request #18390 from vijaygovindaraja/ui/delete-series-page
ui: add delete series page
2026-03-30 12:50:47 +01:00
Arve Knudsen
d6c18a4d62
promql: add test and docs for info() behavior when info series goes stale (#18352)
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
* promql: add test for info() with data label matcher when info series goes stale

When info() is called with a data label matcher that doesn't match
the empty string (e.g. {data=~".+"}), samples at timestamps where
no info series is available should be dropped rather than falling
back to the original un-enriched series.

This case was missing from the test suite.

* docs: document info() behavior when info series is unavailable

Document that when no matching info series exists at a timestamp,
data label matchers that don't match the empty string cause the
sample to be dropped, while empty-matching matchers or no selector
return the series unenriched.

* promql: add test cases for info() fallback when info series goes stale

Add test cases for info(metric, {data=~".*"}) and info(metric) to
complement the existing info(metric, {data=~".+"}) test case, making
the behavioral contrast explicit: empty-matching matchers and no
selector fall back to the unenriched series, while non-empty-matching
matchers drop the sample.

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-03-30 09:32:29 +02:00
Vijay Govindarajan
f9bbda6bcd ui: adopt timezone-aware DateTimePicker for delete series time inputs
Use the same dayjs + useLocalTime pattern from the query page's
TimeInput component so the datetime pickers respect the user's
global "use local time" setting. Adds valueFormat with seconds
precision and stores timestamps as milliseconds internally.

Signed-off-by: Vijay Govindarajan <vijay.govindarajan91@gmail.com>
2026-03-29 23:11:23 -07:00
Vijay Govindarajan
e26cf80bdd ui: move delete series into TSDB Status page and address review feedback
Address review feedback from juliusv:

- Move delete series UI into the existing TSDB Status page instead of
  creating a new top-level page, keeping the navigation minimal
- Use Textarea instead of TextInput for multi-line series selectors
- Use DateTimePicker from @mantine/dates for time range inputs
- Separate error/success states for delete vs clean tombstones
  operations, showing alerts in the appropriate card
- Fix warning text to use quoted "Clean Tombstones"
- Remove standalone DeleteSeriesPage.tsx, revert App.tsx routing and
  settingsSlice.ts changes

Signed-off-by: Vijay Govindarajan <vijay.govindarajan91@gmail.com>
2026-03-29 08:34:09 -07:00
Vijay Govindarajan
7d14fbe0ae ui: add delete-series to pagePaths for path prefix detection
Without this, navigating directly to /delete-series under a path
prefix (e.g. /prometheus/delete-series) would fail to detect the
prefix correctly.

Signed-off-by: Vijay Govindarajan <vijay.govindarajan91@gmail.com>
2026-03-28 16:21:50 -07:00
Vijay Govindarajan
bb7ff1aa05 ui: add delete series page
Adds a web UI page for the delete_series and clean_tombstones admin
APIs, making it easier to manage time series data without using curl
commands directly.

The page provides:
- A form to specify PromQL series selectors for deletion
- Optional start/end time range filters
- A clean tombstones button to reclaim disk space after deletion
- Warning and confirmation feedback

Fixes #17010

Signed-off-by: Vijay Govindarajan <vijay.govindarajan91@gmail.com>
2026-03-28 16:21:06 -07:00
Julien Pivotto
999a67cc04 Release 3.11.0-rc.0
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-27 16:08:11 +01:00
Julien Pivotto
08fcc26479 chore: Update javascript dependencies for 3.11
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-26 12:14:28 +01:00
Julien Pivotto
bcdc7cd80e chore: Go dependencies update before 3.11
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-26 10:56:14 +01:00
Pavel Rysnik
69f6ade976 docs: update promql autocomplete
Signed-off-by: Pavel Rysnik <pavelrysnik@gmail.com>
2026-03-26 10:50:09 +03:00
Julius Volz
df0504f338
Merge pull request #18328 from rickardsjp/histogram-docs
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
docs: clarify that histogram_avg/count/sum/stddev/stdvar are native-histogram-only
2026-03-19 16:46:55 +00:00
Linas Medziunas
4a400dc3df fix(UI): autocomplete for first_over_time and ts_of_first_over_time
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-03-19 16:10:23 +02:00
Jeremy Rickards
7a44a2ddc4
docs: regenerate PromQL function docs for UI
Signed-off-by: Jeremy Rickards <jeremy.rickards@sap.com>
2026-03-19 15:03:31 +01:00