Commit graph

11626 commits

Author SHA1 Message Date
cui fliter 5fc639dabc fix some typos (#12498)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-07-04 15:01:02 +00:00
dependabot[bot] 041c8c8ece build(deps): bump github.com/stretchr/testify
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 15:01:02 +00:00
dependabot[bot] d965a9b8e6 build(deps): bump golang.org/x/oauth2 from 0.8.0 to 0.9.0
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 15:01:02 +00:00
dependabot[bot] 713fafa693 build(deps): bump github.com/aws/aws-sdk-go from 1.44.276 to 1.44.284
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.276 to 1.44.284.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.276...v1.44.284)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 15:01:02 +00:00
dependabot[bot] fc84190b6b build(deps): bump github.com/influxdata/influxdb
Bumps [github.com/influxdata/influxdb](https://github.com/influxdata/influxdb) from 1.11.0 to 1.11.2.
- [Release notes](https://github.com/influxdata/influxdb/releases)
- [Changelog](https://github.com/influxdata/influxdb/blob/master/CHANGELOG_OLD.md)
- [Commits](https://github.com/influxdata/influxdb/commits)

---
updated-dependencies:
- dependency-name: github.com/influxdata/influxdb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 15:01:02 +00:00
SuperQ 9de9d20e5c Update depguard config syntax.
Signed-off-by: SuperQ <superq@gmail.com>
2023-07-04 15:01:01 +00:00
SuperQ f8dee099b2 Disable revive unused-parameter
Signed-off-by: SuperQ <superq@gmail.com>
2023-07-04 15:01:01 +00:00
SuperQ d4a224a503 Update golangci-lint
* Update golangci-lint to v1.53.3.
* Update the sync script handler for the old golanci-lint action.

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-04 15:01:01 +00:00
Filip Petkovski 9949d83331 Add nolint for NewParser function
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-07-04 15:01:01 +00:00
Filip Petkovski df6e388d53 parser: Allow parsing arbitrary functions
In Thanos we would like to start experimenting with custom functions that are
currently not part of the PromQL spec. We would do this by adding an implementation
for those functions in the Thanos engine: https://github.com/thanos-community/promql-engine and allow
users to decide which engine they want to use on a per-query basis.

Since we use the PromQL parser from Prometheus, injecting functions in the global `Functions` variable
would mean they also become available for the Prometheus engine. To avoid this side-effect, this commit
exposes a Parser interface in which the supported functions can be injected as an option. If not functions
are injected, the parser implementation will default to the functions defined in the global Functions variable.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux e86fe245b6 feat refactoring checkrules func
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 3a37731155 fix: update doc
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 7f1f842eba fix: apply suggested changes
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 488ece2899 fix: apply suggested changes
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux ce00e8c7a8 promtool: read from stdin if no filenames are provided in check rules
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
John Losito 04ce186a4d Update configuration.md
Signed-off-by: John Losito <lositojohnj@gmail.com>
2023-07-04 15:01:01 +00:00
Justin Lei 92668d9bf7 Also pass chunkOpts into appendPreprocessor
Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-07-04 15:01:01 +00:00
Justin Lei 7622d5ac5f Group args to append to memSeries in chunkOpts
Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-07-04 15:01:01 +00:00
François Gouteroux e0ab445e9a fix: apply suggested changes
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 3b96cd2feb fix: apply suggested changes
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 9a55e301f7 feat: enhance stdin check and add tests parsing error
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 8f4ef5029c feat: support histogram and summary metric types
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 430a664cf4 feat: make push metrics labels generic and repeatable
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 25d352e6e9 feat: add suggested changes, tests, and stdin support
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
François Gouteroux 5b9accd2b5 feat(promtool): add push metrics command
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-07-04 15:01:01 +00:00
tyltr 96717579d2 typo
Signed-off-by: tyltr <tylitianrui@126.com>
2023-07-04 15:01:01 +00:00
Julien Pivotto ceecaae085 Stepping up as 2.46 release shepherd (#12494)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-04 15:01:01 +00:00
Matt Harbison 407b6be630 Fix path handling in File-SD watcher to allow directory monitoring on Windows
Previously, `d.paths` were normalized to backslashes on Windows, even when if
the config file used Unix style.  The end result meant always watching `./`, so
changes for this config were always ignored:

    scrape_configs:
      - job_name: 'envmsc1'
        file_sd_configs:
        - files:
          - 'targets/envmsc1.d/*.yml'
          - 'targets/envmsc1.d/*.yaml'

Additionally, unlike the other platforms, no warning was emitted on startup
about not being able to install the watch if the directory didn't exist.  Now it
is logged.

Signed-off-by: Matt Harbison <mharbison@atto.com>
2023-07-04 15:01:01 +00:00
Jesus Vazquez 0e2d08f4a8 Release 2.45.0 (#12486)
Signed-off-by: Jesus Vazquez <jesusvzpg@gmail.com>
2023-07-04 15:01:01 +00:00
Jesus Vazquez c5a88748ab Fix PR typo in 2.45.0-rc.1 CHANGELOG (#12479)
Signed-off-by: Jesus Vazquez <jesusvzpg@gmail.com>
2023-07-04 15:01:01 +00:00
Jesus Vazquez e7f9683097 Create 2.45.0-rc.1 (#12478)
Signed-off-by: Jesus Vazquez <jesusvzpg@gmail.com>
2023-07-04 15:01:01 +00:00
Julien Pivotto 57036cfd39 Revert "Improving Performance on the API Gzip Handler (#12363)"
This reverts commit dfae954dc1.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-04 15:01:01 +00:00
Bryan Boreham 7defd025cb Placate lint
I think the version using scoping was better, but I'm out of energy to fight the linter.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-04 15:01:01 +00:00
Bryan Boreham cfbbd2ce2a promql: include parsing in active-query tracking
So that the max-concurrency limit is applied.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-04 15:01:01 +00:00
Bryan Boreham 1706264cef promql: refactor: create query object before parsing
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-04 15:01:01 +00:00
Bryan Boreham 621d29795d promql: refactor: extract fn to wait on concurrency limit
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-04 15:01:01 +00:00
dependabot[bot] 21c605a264 build(deps): bump github.com/prometheus/prometheus
Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.43.0 to 0.44.0.
- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/prometheus/compare/v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 15:01:01 +00:00
Julien Pivotto 71b5a9f79f Add support for inline TLS certificates
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-04 15:01:01 +00:00
Jesus Vazquez 18f3c26ce0 Bump UI version (#12440)
Signed-off-by: Jesus Vazquez <jesusvzpg@gmail.com>
2023-07-04 15:01:01 +00:00
Jesus Vazquez 3961006613 Create release candidate 2.45.0-rc.0 (#12435)
Signed-off-by: Jesus Vazquez <jesusvzpg@gmail.com>
2023-07-04 15:01:01 +00:00
Bartol Deak 21d015a2c2 rewrite which with command -v
Signed-off-by: Bartol Deak <b@bdeak.net>
2023-07-04 15:01:01 +00:00
Bartol Deak 796842d8a8 Hide which stderr output
Signed-off-by: Bartol Deak <b@bdeak.net>
2023-07-04 15:01:01 +00:00
timmartin-stripe 5c1b02ec6e Add sentence explaining what happens when the for clause is omitted (#12457)
Just adding a statement here explaining that the default is an
immediate move to "active" without a pending state.

Signed-off-by: Tim Martin <tim@timmartin.me>
2023-07-04 15:01:01 +00:00
Jayapriya Pai 115f31392a docs: update prometheus-operator link
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
2023-07-04 15:01:01 +00:00
Oleg Zaytsev 65d38b6771 mv labels_string.go labels_stringlabels.go (#12328)
This is a minor cosmetical change, but my IDE (and I guess many of them)
nests `labels_string.go` under `labels.go` because it assumes it's the
file generated by the `stringer` tool, which follows that naming
pattern.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-07-04 15:01:01 +00:00
Arthur Silva Sens 873411ffce Add feature flag to squash metadata from /api/v1/metadata (#12391)
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2023-07-04 15:01:01 +00:00
sinkingpoint 8bfb886573 Remove trailing commas from Exemplar API docs
The trailing commas here make this example invalid JSON. Here we remove
them.

Signed-off-by: sinkingpoint <colin@quirl.co.nz>
2023-07-04 15:01:01 +00:00
Michael Hoffmann 7f9fe4cb5f feat: dont compile regex matcher if we know its a literal (#12434)
labels: dont compile regex matcher if we know its a literal

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

Co-authored-by: Sharad <sharadgaur@gmail.com>
2023-07-04 15:00:51 +00:00
Leo Q 90f6c1faba add alert for sd refresh failure (#12410)
* add alert for sd refresh failure

Due to config error or sd service down, prometheus may fail to refresh sd resource, which may lead to scrape fail or irrelavant metrics.

Signed-off-by: Leo Q <LeoQuote@users.noreply.github.com>

* apply suggestions

Signed-off-by: Leo Q <LeoQuote@users.noreply.github.com>

---------

Signed-off-by: Leo Q <LeoQuote@users.noreply.github.com>
2023-07-04 13:39:01 +00:00
Julius Volz f5c5806f20 Rename remaining jitterSeed -> offsetSeed variables (#12414)
I had changed the naming from "jitter" to "offset" in:

cb045c0e4b

...but I forgot to add this file to the commit to complete the renaming,
doing that now.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2023-07-04 13:39:01 +00:00