Commit graph

10273 commits

Author SHA1 Message Date
Björn Rabenstein f76104d3e4
Merge pull request #10635 from prometheus/beorn7/doc
Update README.md
2022-04-27 17:31:05 +02:00
beorn7 01d90aef3c README.md: Cease to call the React UI "new experimental"
Signed-off-by: beorn7 <beorn@grafana.com>
2022-04-27 17:26:02 +02:00
beorn7 5d7b929e77 README.md: Update Godoc link
Signed-off-by: beorn7 <beorn@grafana.com>
2022-04-27 14:15:39 +02:00
Ted Robertson 9558b9b54b
Examples: explain what the duration in brackets means (#10589)
Signed-off-by: Ted Robertson <10043369+tredondo@users.noreply.github.com>
2022-04-27 11:31:01 +02:00
Ziqi Zhao 74e5b596da
add stripDomain to template function (#10475)
* add stripDomain to template function

Signed-off-by: Ziqi Zhao <zzqwf12345@163.com>
2022-04-27 11:30:05 +02:00
Matthieu MOREL e2ede285a2
refactor: move from io/ioutil to io and os packages (#10528)
* refactor: move from io/ioutil to io and os packages
* use fs.DirEntry instead of os.FileInfo after os.ReadDir

Signed-off-by: MOREL Matthieu <matthieu.morel@cnp.fr>
2022-04-27 11:24:36 +02:00
AndreSPy1 d8ca9aa67b
Allow setting the search term on alerts, targets, and discovery pages via the URL (#10613)
* changes in files of the expr in alerts, service and targets, Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* update prettier corrections

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* update prettier corrections

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* correction suggested fixes PR

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* Update Snap AlertContents.test.tsx and update recommendations in the code

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* Update web/ui/react-app/src/components/SearchBar.tsx

exactly, thanks :)

Co-authored-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* Revert "Update web/ui/react-app/src/components/SearchBar.tsx
"

This reverts commit 679c763a02f65297e3f761db372a0928550f288c.

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* update SearchBar component

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* eslint-disable update SearchBar testing failed

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* correction part in eslint-disable

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* fully corrected suggestion with search expression in url

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

* implementation in handleSearchChange with useCallBack

Signed-off-by: AndreSPy1 <elsenorcito@gmail.com>

Co-authored-by: Julius Volz <julius.volz@gmail.com>
2022-04-26 21:20:48 +02:00
David Heap 685493187e
Support numerical labels in PuppetDB service discovery (#10633)
Fixes #10626 where previously only bool and string were supported

Signed-off-by: David Heap <david.heap@tnp.net.uk>
2022-04-26 17:39:33 +05:30
Julien Pivotto 64fc3e58fe
Split go1.18 and changelog (#10622)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-26 13:57:02 +02:00
Mauro Stettler 64e6c171c2
Merge pull request #216 from grafana/merge_upstream
add option to use the new chunk disk mapper from upstream
2022-04-25 11:27:15 -04:00
Mauro Stettler 55cbbafe38
update comment
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
2022-04-25 15:05:21 +00:00
Julien Pivotto fc3f1b8ded
Move issue template to yml; add form. (#10576)
* Move issue template to yml; add form.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Address comment

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* Add render for versions

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* Add placeholders

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* More placeholder

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* More required: true

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* More render:

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-22 16:36:30 +02:00
Julien Pivotto 9fcf0b3d46
Merge pull request #10616 from prometheus/release-2.35
Release 2.35
2022-04-21 14:17:08 +02:00
Augustin Husson 6656cd29fe
cut v2.35.0 (#10614)
* cut v2.35.0

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* add a note about the changes introduced by go1.18

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-04-21 11:38:51 +02:00
Joker b2c21433eb
Fix exemplar docs. (#10609)
Signed-off-by: Joker <joker9764@126.com>
2022-04-21 10:15:14 +02:00
Julien Pivotto 09da88114d Support overriding minimum TLS version
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-20 23:41:30 +02:00
Chris Marchbanks a11e73edda
Fix a deadlock between Batch and FlushAndShutdown (#10608)
If FlushAndShutdown is called with a full batchQueue, and then Batch is
called rather than the normal path of reading from a queue a deadlock
might be encountered. Rather than having FlushAndShutdown having
blocking code while holding a lock retry sending the batch every second.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2022-04-20 20:50:41 +02:00
Oleg Zaytsev 19bfb1e6e1
Merge pull request #221: Update prometheus to af0f6da5
Update prometheus to `af0f6da5`
2022-04-20 18:18:44 +02:00
Oleg Zaytsev 9d66af50a8
Fix TestMemSeries_append_atVariableRate
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2022-04-20 17:50:05 +02:00
Oleg Zaytsev ac87e2d4d6 Merge remote-tracking branch 'prometheus/main' into update-prometheus 2022-04-20 17:39:51 +02:00
Oleg Zaytsev af0f6da5cb
Fix chunk overflow appending samples at a variable rate (#10607)
* Add a test with variable samples rate append

This test overflows the chunk created in memseries, and the total amount
of samples in the (only) mmapped chunk is 29, instead of the 65565
appended ones.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>

* Cut new chunk when rate prediction was wrong

When appending samples at a slow rate, and then appending at a higher
rate, the prediction we made to cut a new chunk is no longer valid.
Sometimes this can even cause an overflow in the chunk, if more samples
than uint16 can hold are appended.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>

* Improve comment on 2*samplesPerChunk

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>

* Assert that all chunks have less than 240 samples

Also, trigger new chunk at 240, not at more than 240

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2022-04-20 14:54:20 +02:00
Mauro Stettler 00f1b1556c
undo renaming
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
2022-04-19 20:16:20 +00:00
Mauro Stettler 2eef3e76b8
check return status of cutnewfile
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
2022-04-19 20:15:37 +00:00
Mauro Stettler 3fa636a799
fix unit test
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
2022-04-19 19:57:33 +00:00
Mauro Stettler 04114aa2e6
add old chunk disk mapper back
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
2022-04-19 19:21:22 +00:00
Mauro Stettler bd50b04fed
remove old chunk disk mapper initialization and replace it with the upstream one
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
2022-04-18 18:03:05 +00:00
Paschalis Tsilias 40c1efe8bc
tsdb/agent: Ignore duplicate exemplars (#10595)
* tsdb/agent: Ignore duplicate exemplars

Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>

* Make each exemplar unique in TestCommit

Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>

* Re-Trigger CI for Windows and UI-related steps

Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>

* Change test comment to properly re-trigger pipeline

Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>

* Defer Close() calls for test agent and segment reader

Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2022-04-18 11:41:04 -04:00
Paschalis Tsilias 4deb1a90d2 Amend Protobuf docstrings referring to model/ packages
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2022-04-16 00:37:16 +02:00
Jesus Vazquez ee2f94b752
Merge pull request #209 from grafana/jvp/merge-prometheus-main
Merge prometheus/main
2022-04-15 12:40:51 +02:00
Jesus Vazquez a07d60a5dd Remove codeql analysis workflow 2022-04-15 12:16:42 +02:00
Jesus Vazquez 7106db9303 Merge remote-tracking branch 'upstream/main' into jvp/merge-prometheus-main 2022-04-15 12:09:46 +02:00
Julien Pivotto 685ce9964d
Merge pull request #10599 from prometheus/release-2.35
Merge back release 2.35
2022-04-15 00:10:06 +02:00
Julien Pivotto 624967fdbf
Add note about Prometheus as a library (#10594)
* Add note about Prometheus as a library

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-14 22:23:47 +02:00
Augustin Husson 5b80eaa3ca
cut v2.35.0-rc1 (#10596)
* cut v2.35.0-rc1

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-04-14 16:41:28 +02:00
Goutham Veeramachaneni ec3d02019e
Pass the correct context to staleness Appender (#10588)
OTel Collector prints the following error when a target disappears:

```
2022-04-13T14:20:24.932-0400	warn	scrape/scrape.go:1408	Stale append failed	{"kind": "receiver", "name": "prometheus", "scrape_pool": "beep-boop", "target": "http://localhost:9090/metrics", "error": "transaction aborted"}
```

This `transaction aborted` error is returned by the custom appender that is
used by the collector when the context of the appender is cancelled:
b7bf11174e/receiver/prometheusreceiver/internal/otlp_transaction.go (L81-L82)

We call `endOfRunStaleness` after `sl.stop()` which cancels `sl.ctx`.
The other `.Appender()` calls use `parentCtx` for the same reason.

This hasn't come up so far because Prometheus' Appender implementation just
ignores the context passed.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2022-04-14 10:03:07 -04:00
Julien Pivotto b4d0dcb6e8 Tracing/GRPC: Set TLS credentials only when insecure is false.
Fixes #10542

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-14 15:18:59 +02:00
Julien Pivotto db8c550570
Revoke storing target and metadata cache in context. (#10590)
Storing the scrape cache and the target (which also contains that cache)
is apparently causing hige memory increase. I think me might not control
the lifespan of the context enough, therefore old objects keep living in
memory for longer than needed.

Let's unblock the release and look for an alternative so that downstream
consumers can get access to that data.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-14 15:18:46 +02:00
Julien Pivotto 4d8b77546d
Changelog: add missing enhancement (#10593)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-14 15:05:26 +02:00
Jayapriya Pai 580e852f10 scrape: Update error message for label limits
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
2022-04-14 11:43:17 +02:00
Robert Fratto 286dfc70b7
tsdb/agent: port grafana/agent#676 (#10587)
* tsdb/agent: port grafana/agent#676

grafana/agent#676 fixed an issue where a loading a WAL with multiple
segments may result in ref ID collision. The starting ref ID for new
series should be set to the highest ref ID across all series records
from all WAL segments.

This fixes an issue where the starting ref ID was incorrectly set to the
highest ref ID found in the newest segment, which may not have any ref
IDs at all if no series records have been appended to it yet.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* tsdb/agent: update terminology (s/ref ID/nextRef)

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
2022-04-14 10:27:06 +02:00
TomasKohout a1aa3721e8
uber.go/automaxprocs package upgrade for cgroups2 support (#10584)
Signed-off-by: Tomas Kohout <tomas.kohout1995@gmail.com>
2022-04-13 09:41:28 -04:00
Ganesh Vernekar f78acd1986
Merge pull request #199 from grafana/jvp/merge-prometheus-main
Merges prometheus/main into mimir-prometheus/main
2022-04-13 18:43:01 +05:30
Jesus Vazquez 51f26e0cba Necessary changes to make the merge work
This commit disables some unused workflows on our CI.

Also uses grafana/regexp instead of regexp which is blackisted.

Also updates head_test TestHeadReadWriterRepair increasing
ChunkWriteQueueSize to 1 so that the chunk disk mapper uses the async
queue. This seems to be default behaviour in upstream prometheus and
without this option our test fails.
2022-04-13 14:45:43 +02:00
Julien Pivotto a5e75f3551
changelog: Add missing enhancements (#10583)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-04-13 05:29:48 -05:00
Julien Pivotto dc8b673299
Build the UI when making UI tarball (#10578)
We run ui-install on ci but not ui-build. This PR resolves that.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-04-12 19:22:51 +01:00
Julien Pivotto 1186974715
Publish UI release artefact in our github releases (#10577)
This will make UI static files part of the release artefacts, for
consumption by downstream distributions.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-04-12 19:23:02 +02:00
Jesus Vazquez 48aa5cd096 Merge remote-tracking branch 'upstream/main' into jvp/merge-prometheus-main 2022-04-12 16:40:00 +02:00
Jesus Vazquez c02b13b7f4
Discard unknown chunk encodings (#196)
* Chunks replay skips chunks with unknown encodings

We've changed the logic of loadMmappedChunks to skip chunks that have
unknown encodings. To do so we've modified IterateAllChunks to accept an
extra encoding argument in the callback function.

Also added unit tests in the head and chunk disk mapper.

* Also add an unit test for the old chunk diskmapper

* s/createUnsupportedChunk/writeUnsupportedChunk/g
2022-04-12 10:35:10 +00:00
chavacava 0b41fd6e71
Fix data races in WAL replay (#10571)
Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
2022-04-12 16:00:20 +05:30
Jesus Vazquez 5db6963dea
Fix linting errors (#198) 2022-04-12 10:15:22 +00:00