Commit graph

563 commits

Author SHA1 Message Date
Chris Marchbanks 692eb7e722
Encode PromQL Matricies with Arrow
Use content negotiation to return a stream of Arrow records from the
query and query_range endpoints in the case where a matrix is returned.
This provides vastly superior CPU performance both on the server and on
the client when transferring significant amounts of data.

goos: darwin
goarch: arm64
pkg: github.com/prometheus/prometheus/web/api/v1
BenchmarkRespond-8                  2326            475496 ns/op          213687 B/op          8 allocs/op
BenchmarkRespondArrow-8            16176             74459 ns/op          452520 B/op         83 allocs/op

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2023-01-13 11:17:14 -07:00
Ganesh Vernekar b4e15899d1
docs: Update recording rule docs about native histograms
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-01-12 20:43:02 +05:30
Ganesh Vernekar 2e538be5d7
docs: Update federation docs for native histograms
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-01-12 20:43:02 +05:30
Sam Jewell f88a0a7d83
Update example rules file to be valid with the default scrape config (#11692)
* Update docs example rules for default config

The prometheus download includes a default config to scrape itself.
This self-scraping prometheus doesn't include any metric named as
`http_inprogress_requests`, but does include one named
`prometheus_http_requests_total`.
Updating this example rule in the docs to one which can be used
out-of-the-box with the default download would be a nice improvement.

Signed-off-by: Sam Jewell <sam.jewell@grafana.com>

* Update syntax as per @LeviHarrison's review

Co-authored-by: Levi Harrison <levisamuelharrison@gmail.com>
Signed-off-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>

Signed-off-by: Sam Jewell <sam.jewell@grafana.com>
Signed-off-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
Co-authored-by: Levi Harrison <levisamuelharrison@gmail.com>
2023-01-09 19:36:07 -05:00
Robbe Haesendonck e802ddf435 docs: 📝 Changed occurences of proxy_connect_headers to proxy_connect_header
Since the struct defines proxy_connect_header instead of proxy_connect_headers, all relevant occurences of it were replaced with the correct configuration name as defined in the HTTPClientConfig struct.

Signed-off-by: Robbe Haesendonck <googleit@inuits.eu>
2023-01-09 14:11:00 +01:00
Łukasz Mierzwa e1b7082008
Show individual scrape pools on /targets page (#11142)
* Add API endpoints for getting scrape pool names

This adds api/v1/scrape_pools endpoint that returns the list of *names* of all the scrape pools configured.
Having it allows to find out what scrape pools are defined without having to list and parse all targets.

The second change is adding scrapePool query parameter support in api/v1/targets endpoint, that allows to
filter returned targets by only finding ones for passed scrape pool name.

Both changes allow to query for a specific scrape pool data, rather than getting all the targets for all possible scrape pools.
The problem with api/v1/targets endpoint is that it returns huge amount of data if you configure a lot of scrape pools.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>

* Add a scrape pool selector on /targets page

Current targets page lists all possible targets. This works great if you only have a few scrape pools configured,
but for systems with a lot of scrape pools and targets this slow things down a lot.
Not only does the /targets page load very slowly in such case (waiting for huge API response) but it also take
a long time to render, due to huge number of elements.
This change adds a dropdown selector so it's possible to select only intersting scrape pool to view.
There's also scrapePool query param that will open selected pool automatically.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2022-12-23 11:55:08 +01:00
Pablo Ley fb30ffda75
Fixed typo in the Remote Read API docs
Signed-off-by: Pablo Ley <pablo_ley@hotmail.com>

Signed-off-by: Pablo Ley <pablo_ley@hotmail.com>
2022-12-21 12:44:25 +01:00
Julien Pivotto b2226258bc
Merge pull request #11706 from dannystaple/patch-1
Docs [unit-testing]: Add an explanation to the expanding notation
2022-12-21 09:21:12 +01:00
David Fridman 52adf55631
Add VM size label to azure service discovery (#11575) (#11650)
* Add VM size label to azure service discovery (#11575)

Signed-off-by: davidifr <davidfr.mail@gmail.com>

* Add VM size label to azure service discovery (#11575)

Signed-off-by: davidifr <davidfr.mail@gmail.com>

* Add VM size label to azure service discovery (#11575)

Signed-off-by: davidifr <davidfr.mail@gmail.com>

Signed-off-by: davidifr <davidfr.mail@gmail.com>
2022-12-16 13:14:35 -05:00
Danny Staple f3f800ea6f
Terminology amendment
Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-15 16:22:40 +00:00
Oleg Zaytsev 6197ed63d8
Remove comments from the remote read docs
I think these are not intended to be here.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2022-12-15 16:57:44 +01:00
Danny Staple 7269a6e21a
Fix the output example
(based on empirical unit testing)

Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-14 12:21:34 +00:00
Danny Staple 87b9f1d24a
Fix typo I introduced in unit testing rules.
Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-14 12:20:28 +00:00
Julien Pivotto c396c3e32f Update go dependencies before 2.41
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-14 11:30:36 +01:00
Danny Staple b614fdd8a7
Update unit_testing_rules.md
Update the shorthand, and note the different behaviour between missing samples and numbers.

Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-13 15:52:40 +00:00
Danny Staple 300d6e4390
Add an explanation to the expanding notation
After some team discussion, we found this to be a useful was to explain the samples.

Signed-off-by: Danny Staple <danny@orionrobots.co.uk>
2022-12-13 11:11:13 +00:00
John Carlo Roberto 924ba90c3f
Add link to best practices in "Defining Recording Rules" page (#11696)
* docs: Add link to best practices in "Defining Recording Rules" page

Signed-off-by: John Carlo Roberto <10111643+Irizwaririz@users.noreply.github.com>

* docs: Improve wording

Signed-off-by: John Carlo Roberto <10111643+Irizwaririz@users.noreply.github.com>

Signed-off-by: John Carlo Roberto <10111643+Irizwaririz@users.noreply.github.com>
2022-12-12 16:08:45 +01:00
Julien Pivotto 01382cadc3 Update Prometheus/common
- Check if TLS certificate and key file have been modified
  https://github.com/prometheus/common/issues/345
- Add the ability to specify the maximum acceptable TLS version
  https://github.com/prometheus/common/issues/414

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-08 14:51:17 +01:00
Levi Harrison f81fae2414
Add common HTTP client to AWS SDs (#11611)
* Common client in EC2 and Lightsail

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Azure -> AWS

Signed-off-by: Levi Harrison <git@leviharrison.dev>

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2022-11-22 10:09:14 -05:00
Alex Boltris a2fa375278 remove duplicate line
Signed-off-by: Alex Boltris <ua2fgb@gmail.com>
2022-11-16 18:04:35 +02:00
Julien Pivotto 005ede70de relabel: add keepequal/dropequal relabel action
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-11-10 14:41:02 +01:00
Julien Pivotto 7a67a728a8
Followup on OVHCloud merge (#11529)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-11-03 15:04:19 +01:00
Marine Bal 16c3aa75c0
Add service discovery for OvhCloud (#10802)
* feat(ovhcloud): add ovhcloud management

Signed-off-by: Marine Bal <marine.bal@corp.ovh.com>
Co-authored-by: Arnaud Sinays <sinaysarnaud@gmail.com>
2022-11-03 10:20:09 +01:00
Ganesh Vernekar e3719d670b
Merge remote-tracking branch 'upstream/main' into sparsehistogram
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-25 14:38:56 -04:00
David Cañadillas 51a44e6657
Adding Consul Enterprise Admin Partitions (#11482)
* Adding Consul Enterprise Admin Partitions

Signed-off-by: dcanadillas <dcanadillas@hashicorp.com>
2022-10-21 14:13:01 +02:00
GabyCT 76b0d26be8
Update url for configuration.md doc (#11461)
This PR updates the Serverset url at the configuration.md documentation.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-10-14 23:23:20 +02:00
Björn Rabenstein 41035469d3
Document the native histogram feature flag and PromQL (#11446)
Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-14 18:16:12 +05:30
Björn Rabenstein 50529b4804
doc: Document the native histogram JSON format (#11454)
As used in the HTTP query API.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-10-14 17:08:31 +05:30
Björn Rabenstein 1c798ec930
doc: Add notes about feature not yet supported for native histograms (#11453)
Namely federation and recording rules.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-10-14 16:35:27 +05:30
Jesus Vazquez e934d0f011 Merge 'main' into sparsehistogram
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
2022-10-05 22:14:49 +02:00
Julius Volz fbec3bfc90
Small improvements to out-of-order ingestion docs (#11366)
Signed-off-by: Julius Volz <julius.volz@gmail.com>

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-09-30 09:13:32 +02:00
Ganesh Vernekar f371d7f0fb
Add docs for out of order ingestion (#11340)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
Co-authored-by: Levi Harrison <levisamuelharrison@gmail.com>
2022-09-28 20:01:21 +05:30
Ganesh Vernekar f34aeefe6e
Allow overlapping blocks by default (#11331)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-09-28 19:17:54 +05:30
Brian Candler 4a493db432
Add __meta_ec2_region label (#11326)
Fixes #11320

Signed-off-by: Brian Candler <b.candler@pobox.com>

Signed-off-by: Brian Candler <b.candler@pobox.com>
2022-09-19 22:14:55 +02:00
Harold Dost 58b7c890a1
Merge pull request #7266 from hdost/feat/7192-add-documentation-for-api
documentation: Add Reference to the remote read API
2022-09-06 12:09:27 +02:00
Julien Pivotto 15fa34936b
PuppetDB SD: Add __meta_puppetdb_query label (#11238)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-01 17:05:54 +02:00
Nicolas Dumazet 9594fa4dbd
/-/{healthy,ready}/ respond to HEAD (#11160)
Some frameworks issue HEAD requests to determine health.

This resolves prometheus/prometheus#11159

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>
2022-08-16 21:06:26 +02:00
relandrew dfc62920c2
docs: fix typo (#11156)
Signed-off-by: Andrew <106606303+relandrew@users.noreply.github.com>

Signed-off-by: Andrew <106606303+relandrew@users.noreply.github.com>
2022-08-16 09:30:10 +02:00
Frederic Branczyk 0683348121
Merge pull request #11140 from mercedes-benz/export-external-ip
Add LoadBalancerIP to discovered services
2022-08-12 10:48:59 +02:00
Levi Harrison bf264f2021
Add pod_container_image label to docs (#11146)
Signed-off-by: Levi Harrison <git@leviharrison.dev>

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2022-08-11 20:16:28 +02:00
Björn Rabenstein bcd548c88b
Merge pull request #10076 from mtfoley/docs-deriv
docs: update function docs on deriv
2022-08-11 11:49:21 +02:00
beorn7 c9fd3c235d Merge branch 'main' into sparsehistogram 2022-08-10 17:54:37 +02:00
Karl Piplies cc469e0085 documentation for the loadbalancerip
Signed-off-by: Karl Piplies <karl.piplies@mercedes-benz.com>
2022-08-10 12:40:11 +02:00
Chris Sinjakli fba20567c0
Document permissions needed for ec2_sd_configs (#11119)
Currently, it's not explicitly called out which permissions are needed
for service discovery of EC2 instances. It's not super hard to figure
out, but it did involve a bit of guesswork when I did it yesterday, and
I figure it's worth saving people that effort.

I've also seen examples around the internet where people are granting
much broader permissions than they need to, so maybe we can save on that
by explicitly saying what's needed.

Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>
2022-08-05 15:49:38 +02:00
David Leadbeater d677ec489e
Support using MX records for DNS discovery (#10099)
It's currently possible to use blackbox_exporter to probe MX records
themselves. However it's not possible to do an end-to-end test, like is
possible with SRV records. This makes it possible to use MX records as a
source of hostnames in the same way as SRV records.

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2022-08-03 11:19:26 +02:00
Julien Pivotto a6c6155092
Fix YAML and JSON doc section (#11023)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-08-03 11:09:57 +02:00
yngwiewang be330ac035
add __meta_kubernetes_service_port_number (#11053)
Signed-off-by: yngwiewang <yngwiewang@163.com>

Co-authored-by: yngwiewang <yngwiewang@163.com>
2022-07-29 03:39:03 +02:00
Julius Volz b57deb6eb0
Add /api/v1/format_query API endpoint for formatting queries (#11036)
* Add /api/v1/format_query API endpoint for formatting queries

This uses the formatting functionality introduced in
https://github.com/prometheus/prometheus/pull/10544.

I've chosen "query" instead of "expr" in both the endpoint and parameter
names to stay consistent with the existing API endpoints. Otherwise, I
would have preferred to use the term "expr".

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add docs for /api/v1/format_query endpoint

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add note that formatting expressions removes comments

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-07-20 14:55:09 +02:00
Levi Harrison d61459d826
no-default-scrape-port feature flag (#9523)
* Add `no-default-scrape-port` flag

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2022-07-20 13:35:47 +02:00
Jonathan K. Stevens ce1bf8b15a
template: adding formatTime function to TemplateExpander (#10993)
Signed-off-by: Jonathan Stevens <jonathanstevens89@gmail.com>
Signed-off-by: Jonathan Stevens <jon.stevens@getweave.com>

Co-authored-by: Jonathan Stevens <jon.stevens@getweave.com>
2022-07-14 23:45:32 +02:00