Commit graph

789 commits

Author SHA1 Message Date
Marcin Skalski 19709f75d0 fix kuma_sd docs
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
2023-12-12 14:49:43 +01:00
Björn Rabenstein 4b55a71210
Merge pull request #11583 from windsonsea/story
Tweak line wrappings in docs/storage.md
2023-12-12 12:31:02 +01:00
Marcin Skalski 0af810aa71 fix go lint
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
2023-12-11 17:01:52 +01:00
Marcin Skalski d12ccf9fa2 kuma_sd: Extend Kuma SD configuration to allow users to specify ClientId
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
2023-12-11 16:33:42 +01:00
Bartlomiej Plotka 91a383f52c
Merge pull request #13059 from zenador/add-mad-function
Add mad_over_time function
2023-12-08 11:53:22 +00:00
Julien Pivotto 74cd1b6a09
Merge branch 'main' into add-focus-flag-to-promtool-test-rules
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-12-05 12:27:15 +01:00
Julien Pivotto 52b15d2195
Merge pull request #13219 from djcode/main
Discovery: Add support for NS records to DNS Discovery
2023-12-01 16:10:07 +01:00
Jeanette Tan 9bf4cc993e Add mad_over_time function
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-12-01 01:22:58 +08:00
Daniel Jolly 2c420b518e Add support for NS records in DNS discovery
Signed-off-by: Daniel Jolly <code@danieljolly.com>
2023-11-29 12:21:50 -05:00
beorn7 0eb0ca42c5 Update “conventional histogram” → “classic histogram”
Signed-off-by: beorn7 <beorn@grafana.com>
2023-11-29 15:22:58 +01:00
Julien Pivotto c1ec6ae851 sort_by_label: Switch to feature flag
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-11-28 15:10:12 +01:00
Alexander Trost 5051a993ab promql: add sort_by_label and sort_by_label_desc functions
This adds functions to sort a vector by its label value.

Based on https://github.com/prometheus/prometheus/pull/1533

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2023-11-28 14:40:07 +01:00
David Peleg 969a9b7090
Fix docs: in labelname, convert to underscore (#12555)
Fixes https://github.com/prometheus/docs/issues/735

Signed-off-by: David Peleg <107049994+dapeleg-dn@users.noreply.github.com>
2023-11-28 12:30:05 +01:00
zenador ccfe14d7e7
PromQL: ignore small errors for bucketQuantile (#13153)
promql: Improve histogram_quantile calculation for classic buckets

Tiny differences between classic buckets are most likely caused by floating point precision issues. With this commit, relative changes below a certain threshold are ignored. This makes the result of histogram_quantile more meaningful, and also avoids triggering the _input to histogram_quantile needed to be fixed for monotonicity_ annotations in unactionable cases.

This commit also adds explanation of the new adjustment and of the monotonicity annotation to the documentation of `histogram_quantile`.

---------

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-25 00:05:38 +01:00
Łukasz Mierzwa 870627fbed Add enable_compression scrape config option
Currently Prometheus will always request gzip compression from the target when sending scrape requests.
HTTP compression does reduce the amount of bytes sent over the wire and so is often desirable.
The downside of compression is that it requires extra resources - cpu & memory.

This also affects the resource usage on the target since it has to compress the response
before sending it to Prometheus.

This change adds a new option to the scrape job configuration block: enable_compression.
The default is true so it remains the same as current Prometheus behaviour.

Setting this option to false allows users to disable compression between Prometheus
and the scraped target, which will require more bandwidth but it lowers the resource
usage of both Prometheus and the target.

Fixes #12319.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2023-11-20 12:02:55 +00:00
Julien Pivotto c92fbf3fdf Add feature flag for PromQL experimental functions.
This PR adds an Experimental flag to the functions.

This can be used by https://github.com/prometheus/prometheus/pull/13059
but also xrate and other future functions.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-11-14 17:48:58 +01:00
George Krajcsovits e399395b01
Native histograms vs labels (#13005)
* Document le and quantile label transition due to native histograms

Fixes: #12984

For full explanation see the related issue. The le and quantile labels
are formatted as float with trailing .0 for whole number values when
native histograms is enabled, e.g. 10.0. This changes the resulting series
in Prometheus if previously we scraped the whole number itself, e.g. 10
over the text format.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

---------

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
2023-11-01 18:30:34 +01:00
Julien Pivotto 84aadfc45b scrape: Added trackTimestampsStaleness configuration option
Add the ability to track staleness when an explicit timestamp is set.
Useful for cAdvisor.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-10-31 16:58:42 -04:00
Julien Pivotto 0c1e447d68
Exclude alerts: improve documentation (#13046)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-10-30 15:08:11 +00:00
Julien Pivotto 156a23d06d
Merge pull request #12999 from rajagopalanand/filter-alerts
Adding a query parameter to filter out active alerts
2023-10-30 13:10:24 +01:00
Rens Groothuijsen 122f9506e9
Set test group interval default to evaluation interval (#13011)
Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
2023-10-20 21:32:46 +11:00
Anand Rajagopal 2ade8adf9e Adding a query parameter to filter out active alerts
Signed-off-by: Anand Rajagopal <anrajag@amazon.com>
2023-10-18 02:05:26 +00:00
Björn Rabenstein 35ec9d1f89
Merge pull request #12868 from jdellithorpe-db/alert-unit-test-doc-fix
Promtool: Fix/clarify documentation for axn notation.
2023-10-17 19:04:30 +02:00
Bartlomiej Plotka 624b973ebf
Added ability to specify scrape protocols to accept during HTTP content type negotiation. (#12738)
* Added ability to specify scrape protocols to accept during HTTP content type negotiation.


This is done via new option in GlobalConfig and ScrapeConfig: "scrape_protocol"

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

* Fixed readability and log message.

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

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-10-10 11:16:55 +01:00
Jonathan Ellithorpe 91650a32cc Fix/clarify documentation for axn notation
Signed-off-by: Jonathan Ellithorpe <jelli@databricks.com>
2023-10-07 08:09:30 -07:00
rakshith210 cdad64002a
Added Azure OAuth support (#12572)
* Added Azure OAuth support

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Added missing comment

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Addressing comment

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Fixed lint issue

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Fix test

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Addressing comments

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Added documentation and updated unit tests

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

* Addressing comments

Signed-off-by: rakshith210 <rakshith.me@gmail.com>

---------

Signed-off-by: rakshith210 <rakshith.me@gmail.com>
2023-10-04 22:16:36 -04:00
Jennifer Villa ea7bec4cc7
Update recording_rules.md
updated language to be a bit more clear

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-10-02 21:44:54 -04:00
Jennifer Villa 65ffa0c511
Update recording_rules.md
adding Josh's suggestion

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-10-02 21:37:29 -04:00
Jennifer Villa 601e5b9028
Update recording_rules.md
specified the evaluation interval defines when the next evaluation should start.

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-09-30 10:26:29 -04:00
Jennifer Villa 5027863c40
Clarify what happens when a rule group takes too long to execute
Namely, call out that all subsequent evaluations will be skipped until the initial evaluation completes.

Signed-off-by: Jennifer Villa <jvilla2013@gmail.com>
2023-09-30 10:23:54 -04:00
Julien Pivotto ac0919d48c
Update docs/querying/functions.md
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-09-29 19:10:41 +02:00
lasea75 f15f0ac16a
Update functions.md
Signed-off-by: lasea75 <lasea75@gmail.com>
2023-09-28 12:26:46 -05:00
Julien Pivotto a8cdb7eb6c
Merge branch 'main' into template_reference
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-09-26 13:49:58 +02:00
Ben Ye c78124427e
Support specifying series matchers to analyze tsdb (#12842)
* support specifying series matchers to analyze tsdb

Signed-off-by: Ben Ye <benye@amazon.com>

* fix cli docs

Signed-off-by: Ben Ye <benye@amazon.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>
2023-09-20 11:37:32 +01:00
TJ Hoplock 51d1d2cd96 feat: add AWS sigv4 support to alertmanager endpoints
Addresses: #12536

This commit adds support for configuring sigv4 to an
`alertmanager_config`. Based heavily on the sigv4 work in the remote
write client.

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2023-08-31 21:47:25 -04:00
Julien Pivotto c5e1498ae2
Merge pull request #12743 from wasim-nihal/documentation-alignment
Correcting indentation of basic_auth configuration for uyuni_sd_config
2023-08-29 11:50:19 +02:00
Gregor Zeitlinger f01718262a
Unit tests for native histograms (#12668)
promql: Extend testing framework to support native histograms

This includes both the internal testing framework as well as the rules unit test feature of promtool.

This also adds a bunch of basic tests. Many of the code level tests can now be converted to tests within the framework, and more tests can be added easily.

---------

Signed-off-by: Harold Dost <h.dost@criteo.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Stephen Lang <stephen.lang@grafana.com>
Co-authored-by: Harold Dost <h.dost@criteo.com>
Co-authored-by: Stephen Lang <stephen.lang@grafana.com>
Co-authored-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
2023-08-25 23:35:42 +02:00
zenador 54aaa2bd7e
Add histogram_stdvar and histogram_stddev functions (#12614)
* Add new function: histogram_stdvar and histogram_stddev

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-08-24 21:02:14 +02:00
Wasim Nihal daca364b70 Correcting indentation of basic_auth configuration for uyuni_sd_config
Signed-off-by: Wasim Nihal <sswasim64@gmail.com>
2023-08-24 11:56:44 +05:30
Salar Nosrati-Ershad fd96996b75 docs: fix: correct reference to native histograms feature flag
Signed-off-by: Salar Nosrati-Ershad <snosratiershad@gmail.com>
2023-08-19 17:35:20 +03:30
Bryan Boreham 1e3fef6ab0
scraping: limit detail on dropped targets, to save memory (#12647)
It's possible (quite common on Kubernetes) to have a service discovery
return thousands of targets then drop most of them in relabel rules.
The main place this data is used is to display in the web UI, where
you don't want thousands of lines of display.

The new limit is `keep_dropped_targets`, which defaults to 0
for backwards-compatibility.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-08-14 15:39:25 +01:00
Julien Pivotto 4a56a6bf59
Merge pull request #12643 from gouthamve/add-otlp-docs
Add initial OTLP ingestion docs
2023-08-08 13:08:22 +02:00
Julien Pivotto 4c81a8f681
Merge pull request #11578 from chancefeick/fix/querying-documentation
Fix Querying Documentation Links
2023-08-08 09:21:31 +02:00
Goutham acb1f8a097 Fix API endpoint
Signed-off-by: Goutham <gouthamve@gmail.com>
2023-08-03 14:02:32 +02:00
Goutham Veeramachaneni 9df36c3e5e
Apply suggestions from code review
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Goutham Veeramachaneni <gouthamve+github@gmail.com>
2023-08-03 13:56:54 +02:00
Goutham 6bb5720141
Add initial OTLP ingestion docs
We still need a guide that we can link users to in https://github.com/prometheus/docs/tree/main/content/docs/guides
This guide should show sending metrics from application directly via
the OTel SDKs and also sending through the Collector.

Signed-off-by: Goutham <gouthamve@gmail.com>
2023-08-03 00:12:15 +02:00
Julien Pivotto bb90379163
Merge pull request #11404 from gberche-orange/patch-2
docs (label_replace): illustrate use of named capturing group
2023-07-28 13:23:29 +02:00
Goutham Veeramachaneni ad4f514e66
Add OTLP Ingestion endpoint (#12571)
* Add OTLP Ingestion endpoint

We copy files from the otel-collector-contrib. See the README in
`storage/remote/otlptranslator/README.md`.

This supersedes: https://github.com/prometheus/prometheus/pull/11965

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

* Return a 200 OK

It is what the OTEL Golang SDK expect :(

https://github.com/open-telemetry/opentelemetry-go/issues/4363

Signed-off-by: Goutham <gouthamve@gmail.com>

---------

Signed-off-by: gouthamve <gouthamve@gmail.com>
Signed-off-by: Goutham <gouthamve@gmail.com>
2023-07-28 12:35:28 +02:00
Julien Pivotto 03e549cc39
Merge pull request #8747 from shoce/patch-1
Add instructions how to persist prometheus docker container data
2023-07-26 09:02:48 +02:00
m.nabokikh 9d8463339d Fixes according to the code review
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2023-07-23 00:37:30 +02:00
Guillaume Berche f5fb37dbab
Update functions.md
Add missing linefeed as requested by https://github.com/prometheus/prometheus/pull/11404#discussion_r1266625301

Signed-off-by: Guillaume Berche <guillaume.berche@orange.com>
2023-07-19 08:27:15 +02:00
Julien Pivotto 2bdb2e627f
Merge pull request #10914 from wangrzneu/add-endpointslice-label
Add more labels for endpointslice and endpoints role in k8s discovery
2023-07-18 13:35:03 +02:00
Julien Pivotto fd5b01afdc promtool docs: write flags between backtits in help
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-15 22:32:59 +02:00
Julien Pivotto b3b669fd9a Add experimental flag and docs
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-12 22:33:49 +02:00
Guillaume Berche 60b380da70
Refine functions.md as suggested during review
See https://github.com/prometheus/prometheus/pull/11404#issuecomment-1631165746

Signed-off-by: Guillaume Berche <guillaume.berche@orange.com>
2023-07-12 09:08:23 +02:00
Ziqi Zhao 42d9169ba1 enhance histogram_quantile to get min/max value
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-12 04:29:54 +08:00
Carrie Edwards f93ac97867 Update querying function docs
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2023-07-11 21:51:20 +08:00
Julien Pivotto fc2e4cd3b9 docs: Fix link to feature flags.
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-11 13:17:39 +02:00
Taavi Väänänen 0f4c27e2bf
discovery/openstack: Include instance image ID in labels
Adds a new label to include the ID of the image that an instance is
using. This can be used for example to filter a job to only include
instances using a certain image as that image includes some exporter.

Sometimes the image information isn't available, such as when the image
is private and the user doesn't have the roles required to see it. In
those cases we just don't set the label, as the rest of the information
from the discovery provider can still be used.

Signed-off-by: Taavi Väänänen <hi@taavi.wtf>
2023-07-04 18:50:11 +03:00
João Vilaça 81394ea1c5 Add --run flag to promtool test rules
Signed-off-by: João Vilaça <jvilaca@redhat.com>
2023-06-28 17:57:32 +01:00
Julien Pivotto 1214d314c3
Merge pull request #12225 from fgouteroux/feat/promtool_check_rules_stdin
promtool: read from stdin if no filenames are provided in check rules
2023-06-27 13:22:00 +02:00
Julien Pivotto 53d7aac39e
Merge pull request #12281 from jlosito/patch-1
Update configuration.md
2023-06-27 13:14:26 +02:00
Julien Pivotto 771f512757
Merge pull request #12299 from fgouteroux/promtool_push_metrics_cmd
feat(promtool): add push metrics command
2023-06-27 10:42:14 +02:00
Julien Pivotto e043b273a6
Merge pull request #12439 from prometheus/release-2.45
Merge release 2.45.0 back to main
2023-06-17 10:16:48 +02:00
Julien Pivotto 0de855508c Add support for inline TLS certificates
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-06-17 10:16:10 +02:00
timmartin-stripe 0c6cf86828
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-06-16 11:55:41 +01:00
Jayapriya Pai 81bf3e63a4
docs: update prometheus-operator link
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
2023-06-12 21:39:19 +05:30
Arthur Silva Sens 1ea477f4bc
Add feature flag to squash metadata from /api/v1/metadata (#12391)
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2023-06-12 16:17:20 +01:00
sinkingpoint f7abe27fef 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-06-09 14:08:46 +10:00
rakshith210 b1675e23af
Add Azure AD package for remote write (#11944)
* Add Azure AD package for remote write
* Made AzurePublic default and updated configuration.md
* Updated config structure and removed getToken at initialization
* Changed passing context from request

Signed-off-by: Rakshith Padmanabha <rapadman@microsoft.com>
Signed-off-by: rakshith210 <rakshith.me@gmail.com>
2023-06-01 15:20:10 -06:00
François Gouteroux 6ae4a46845 feat: enhance stdin check and add tests parsing error
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-06-01 10:28:55 +02:00
renzheng.wang 98ffad01b8 update tests and docs
Signed-off-by: renzheng.wang <wangrzneu@gmail.com>
2023-05-30 20:13:52 +08:00
Arianna Vespri a16b876a05
Add limits to global config (#12126)
* Add limits to global config

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Move changes into Validate func

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Make comments consistent wrt 0 meaning no limit

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Document global limits

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

---------

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
2023-05-30 09:22:23 +01:00
SuperQ 044e004a81
Update exporter-toolkit
Adds web config option `client_allowed_sans`. This enables Prometheus to
limit the Subject Alternate Name (SAN) allowed to connect.

Signed-off-by: SuperQ <superq@gmail.com>
2023-05-30 09:08:00 +02:00
François Gouteroux 9cf1b4a2e6 fix: update doc
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-05-28 22:33:47 +02:00
marcoderama a308ea773d
Update functions.md
Fix small typo

Signed-off-by: marcoderama <marcoderamagit@gmail.com>
2023-05-26 16:39:55 -07:00
François Gouteroux 934c5ddb8d feat: make push metrics labels generic and repeatable
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-05-24 11:33:07 +02:00
François Gouteroux 3524a16aa0 feat: add suggested changes, tests, and stdin support
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-05-23 11:15:29 +02:00
Baskar Shanmugam 905a0bd63a
Added 'limit' query parameter support to /api/v1/status/tsdb endpoint (#12336)
* Added 'topN' query parameter support to /api/v1/status/tsdb endpoint

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

* Updated query parameter for tsdb status to 'limit'

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

* Corrected Stats() parameter name from topN to limit

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

* Fixed p.Stats CI failure

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

---------

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>
2023-05-22 14:37:07 +02:00
Julien Pivotto 0dc31ade41 Add support for consul path_prefix
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-05-17 00:14:58 +02:00
Julien Pivotto 41b3db198c
Merge pull request #12367 from AkshaySiwal/main
Updating signal for graceful shutdown in docs/getting_started.md
2023-05-16 22:25:26 +02:00
zenador 191bf9055b
Handle more arithmetic operators for native histograms (#12262)
Handle more arithmetic operators and aggregators for native histograms

This includes operators for multiplication (formerly known as scaling), division, and subtraction. Plus aggregations for average and the avg_over_time function.

Stdvar and stddev will (for now) ignore histograms properly (rather than counting them but adding a 0 for them).

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-05-16 21:15:20 +02:00
Akshay Siwal 4c898fc4a1
Update getting_started.md
Updating signal for graceful shutdown.

Signed-off-by: Akshay Siwal <akshay.singh.siwal@gmail.com>
2023-05-15 13:18:30 +05:30
Björn Rabenstein b727e69b76
Merge pull request #12350 from prometheus/beorn7/histogram
textparse/scrape: Add option to scrape both classic and native histograms
2023-05-13 02:16:11 +02:00
beorn7 9e500345f3 textparse/scrape: Add option to scrape both classic and native histograms
So far, if a target exposes a histogram with both classic and native
buckets, a native-histogram enabled Prometheus would ignore the
classic buckets. With the new scrape config option
`scrape_classic_histograms` set, both buckets will be ingested,
creating all the series of a classic histogram in parallel to the
native histogram series. For example, a histogram `foo` would create a
native histogram series `foo` and classic series called `foo_sum`,
`foo_count`, and `foo_bucket`.

This feature can be used in a migration strategy from classic to
native histograms, where it is desired to have a transition period
during which both native and classic histograms are present.

Note that two bugs in classic histogram parsing were found and fixed
as a byproduct of testing the new feature:

1. Series created from classic _gauge_ histograms didn't get the
   _sum/_count/_bucket prefix set.
2. Values of classic _float_ histograms weren't parsed properly.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-05-13 01:32:25 +02:00
Bryan Boreham 734baa37e0
Merge pull request #12344 from bboreham/rw-stable
docs: state that remote write sending is stable
2023-05-10 18:56:16 +01:00
Bryan Boreham b1b8fd77c4 docs: state that remote write is stable
Since https://github.com/prometheus/docs/pull/2313 has been merged
declaring remote write to be stable at version 1.0.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-05-09 10:29:52 +00:00
Jeanette Tan 40240c9c1c Update according to code review
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-05-05 02:33:00 +08:00
François Gouteroux b1bab7bc54 feat(promtool): add push metrics command
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-04-27 14:49:38 +02:00
Jeanette Tan 2ad39baa72 Treat bucket limit like sample limit and make it fail the whole scrape and return an error
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 03:25:07 +08:00
Jeanette Tan d3ad158a66 Update docs and comments
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 03:14:19 +08:00
John Losito ecf6bfa619
Update configuration.md
Signed-off-by: John Losito <lositojohnj@gmail.com>
2023-04-21 09:26:16 -04:00
gotjosh 74e6668e87
update docs
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-04-20 09:34:15 +01:00
gotjosh cf230bcd18
more wordsmithing
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-04-19 09:51:41 +01:00
gotjosh 28909a4636
more worthsmithing
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-04-18 16:51:35 +01:00
gotjosh e2a2790b2c
add more docs
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-04-18 16:50:16 +01:00
gotjosh f3394bf7a1
Rules API: Allow filtering by rule name
Introduces support for a new query parameter in the `/rules` API endpoint that allows filtering by rule names.

If all the rules of a group are filtered, we skip the group entirely.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-04-18 10:12:08 +01:00
beorn7 c0879d64cf promql: Separate Point into FPoint and HPoint
In other words: Instead of having a “polymorphous” `Point` that can
either contain a float value or a histogram value, use an `FPoint` for
floats and an `HPoint` for histograms.

This seemingly small change has a _lot_ of repercussions throughout
the codebase.

The idea here is to avoid the increase in size of `Point` arrays that
happened after native histograms had been added.

The higher-level data structures (`Sample`, `Series`, etc.) are still
“polymorphous”. The same idea could be applied to them, but at each
step the trade-offs needed to be evaluated.

The idea with this change is to do the minimum necessary to get back
to pre-histogram performance for functions that do not touch
histograms. Here are comparisons for the `changes` function. The test
data doesn't include histograms yet. Ideally, there would be no change
in the benchmark result at all.

First runtime v2.39 compared to directly prior to this commit:

```
name                                                  old time/op    new time/op    delta
RangeQuery/expr=changes(a_one[1d]),steps=1-16            391µs ± 2%     542µs ± 1%  +38.58%  (p=0.000 n=9+8)
RangeQuery/expr=changes(a_one[1d]),steps=10-16           452µs ± 2%     617µs ± 2%  +36.48%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_one[1d]),steps=100-16         1.12ms ± 1%    1.36ms ± 2%  +21.58%  (p=0.000 n=8+10)
RangeQuery/expr=changes(a_one[1d]),steps=1000-16        7.83ms ± 1%    8.94ms ± 1%  +14.21%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_ten[1d]),steps=1-16           2.98ms ± 0%    3.30ms ± 1%  +10.67%  (p=0.000 n=9+10)
RangeQuery/expr=changes(a_ten[1d]),steps=10-16          3.66ms ± 1%    4.10ms ± 1%  +11.82%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_ten[1d]),steps=100-16         10.5ms ± 0%    11.8ms ± 1%  +12.50%  (p=0.000 n=8+10)
RangeQuery/expr=changes(a_ten[1d]),steps=1000-16        77.6ms ± 1%    87.4ms ± 1%  +12.63%  (p=0.000 n=9+9)
RangeQuery/expr=changes(a_hundred[1d]),steps=1-16       30.4ms ± 2%    32.8ms ± 1%   +8.01%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_hundred[1d]),steps=10-16      37.1ms ± 2%    40.6ms ± 2%   +9.64%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_hundred[1d]),steps=100-16      105ms ± 1%     117ms ± 1%  +11.69%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_hundred[1d]),steps=1000-16     783ms ± 3%     876ms ± 1%  +11.83%  (p=0.000 n=9+10)
```

And then runtime v2.39 compared to after this commit:

```
name                                                  old time/op    new time/op    delta
RangeQuery/expr=changes(a_one[1d]),steps=1-16            391µs ± 2%     547µs ± 1%  +39.84%  (p=0.000 n=9+8)
RangeQuery/expr=changes(a_one[1d]),steps=10-16           452µs ± 2%     616µs ± 2%  +36.15%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_one[1d]),steps=100-16         1.12ms ± 1%    1.26ms ± 1%  +12.20%  (p=0.000 n=8+10)
RangeQuery/expr=changes(a_one[1d]),steps=1000-16        7.83ms ± 1%    7.95ms ± 1%   +1.59%  (p=0.000 n=10+8)
RangeQuery/expr=changes(a_ten[1d]),steps=1-16           2.98ms ± 0%    3.38ms ± 2%  +13.49%  (p=0.000 n=9+10)
RangeQuery/expr=changes(a_ten[1d]),steps=10-16          3.66ms ± 1%    4.02ms ± 1%   +9.80%  (p=0.000 n=10+9)
RangeQuery/expr=changes(a_ten[1d]),steps=100-16         10.5ms ± 0%    10.8ms ± 1%   +3.08%  (p=0.000 n=8+10)
RangeQuery/expr=changes(a_ten[1d]),steps=1000-16        77.6ms ± 1%    78.1ms ± 1%   +0.58%  (p=0.035 n=9+10)
RangeQuery/expr=changes(a_hundred[1d]),steps=1-16       30.4ms ± 2%    33.5ms ± 4%  +10.18%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_hundred[1d]),steps=10-16      37.1ms ± 2%    40.0ms ± 1%   +7.98%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_hundred[1d]),steps=100-16      105ms ± 1%     107ms ± 1%   +1.92%  (p=0.000 n=10+10)
RangeQuery/expr=changes(a_hundred[1d]),steps=1000-16     783ms ± 3%     775ms ± 1%   -1.02%  (p=0.019 n=9+9)
```

In summary, the runtime doesn't really improve with this change for
queries with just a few steps. For queries with many steps, this
commit essentially reinstates the old performance. This is good
because the many-step queries are the one that matter most (longest
absolute runtime).

In terms of allocations, though, this commit doesn't make a dent at
all (numbers not shown). The reason is that most of the allocations
happen in the sampleRingIterator (in the storage package), which has
to be addressed in a separate commit.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-04-13 19:25:16 +02:00
François Gouteroux 8472596fd0 fix: apply suggested changes
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-04-05 14:51:08 +02:00
François Gouteroux 034eb2b3f2 promtool: read from stdin if no filenames are provided in check rules
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-04-05 11:33:47 +02:00
Julien Pivotto 391473141d
Check health & ready: move to flags (#12223)
This makes it more consistent with other command like import rules. We
don't have stricts rules and uniformity accross promtool unfortunately,
but I think it's better to only have the http config on relevant check
commands to avoid thinking Prometheus can e.g. check the config over the
wire.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-04-05 09:45:39 +02:00
Nidhey Nitin Indurkar 3f7beeecc6
feat: health and readiness check of prometheus server in CLI (promtool) (#12096)
* feat: health and readiness check of prometheus server in CLI (promtool)

Signed-off-by: nidhey27 <nidhey.indurkar@infracloud.io>
2023-04-03 22:32:39 +02:00
Julien Pivotto ae220724d4 Docs: use boolean instead of bool
boolean makes the type consistent and clickable on
https://prometheus.io/docs/prometheus/latest/configuration/configuration/

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-21 17:28:31 +01:00
Julien Pivotto fd8992cdbd
Merge pull request #12137 from g3offrey/fix/update-prometheus-ansible-link
docs: update ansible installation link
2023-03-20 11:14:56 +01:00
beorn7 71c57a1292 docs: Clarify that range selectors use a closed interval
Signed-off-by: beorn7 <beorn@grafana.com>
2023-03-16 13:55:57 +01:00
g3offrey d01c51fad0 docs: update ansible installation link
Signed-off-by: g3offrey <11151445+g3offrey@users.noreply.github.com>
2023-03-15 15:58:44 +01:00
Julien Pivotto bec68558ba
Merge pull request #12125 from roidelapluie/promtooldoc
Command Line Documentation
2023-03-14 10:59:33 +01:00
Julien Pivotto 1922db0586 Document command line tools
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-13 14:20:55 +01:00
Bartlomiej Plotka 742979a3e5
Merge pull request #10704 from hdost/feat/167-prometheus-docs
docs: Add signal information to getting started
2023-03-12 13:02:54 +01:00
Harold Dost 3125e169ae docs: Add signal information to getting started
Closes prometheus/docs#167

Signed-off-by: Harold Dost <h.dost@criteo.com>
2023-03-12 00:31:04 +01:00
Julien Pivotto 0c56e5d014 Update our own dependencies, support proxy from env
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-08 12:00:17 +01:00
Julien Pivotto 599b70a05d Add include scrape configs
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-06 23:35:39 +01:00
Charles Korn e023d896f2
Correct statement in docs about query results returning either floats or histograms but not both. (#11880)
* Correct statement in docs about query results returning either floats or histograms but not both.

* Move documentation for range and instant vectors under their corresponding headings.

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-01-31 13:34:17 +05:30
Julien Pivotto aeecf6854f
Merge pull request #11827 from roidelapluie/stabilize
Add 'keep_firing_for' field to alerting rules
2023-01-25 09:52:45 +01:00
Peter Nicholson bba95df0e9 Update documentation
Signed-off-by: Peter Nicholson <petergoods@hotmail.com>
2023-01-19 18:58:17 +01:00
Frederic Branczyk 9f91215bf6
Merge pull request #11844 from bawhetst/add-pod-container-id
discovery/kubernetes: add container ID as a meta label for pod targets
2023-01-17 19:19:22 +01:00
Ben Whetstone 52d5a7c60f Document the __meta_kubernetes_pod_container_id meta label
Signed-off-by: Ben Whetstone <ben.whetstone@sysdig.com>
2023-01-17 11:15:52 -05:00
Julien Pivotto a35e54cc56
Merge pull request #11786 from LeviHarrison/remove-nomad-datacenter-docs
Remove Nomad `datacenter` field in configuration docs
2023-01-16 14:42:40 +01:00
Julien Pivotto ce55e5074d Add 'keep_firing_for' field to alerting rules
This commit adds a new 'keep_firing_for' field to Prometheus alerting
rules. The 'resolve_delay' field specifies the minimum amount of time
that an alert should remain firing, even if the expression does not
return any results.

This feature was discussed at a previous dev summit, and it was
determined that a feature like this would be useful in order to allow
the expression time to stabilize and prevent confusing resolved messages
from being propagated through Alertmanager.

This approach is simpler than having two PromQL queries, as was
sometimes discussed, and it should be easy to implement.

This commit does not include tests for the 'resolve_delay' field.  This
is intentional, as the purpose of this commit is to gather comments on
the proposed design of the 'resolve_delay' field before implementing
tests. Once the design of the 'resolve_delay' field has been finalized,
a follow-up commit will be submitted with tests."

See https://github.com/prometheus/prometheus/issues/11570

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-01-13 12:11:39 +01: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
Levi Harrison 89539c35c9 Remove nomad datacenter field in configuration docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2022-12-29 14:18:42 -05: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
Chance Feick 2cfd8da628
Update docs/querying/basics.md
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Chance Feick <6326742+chancefeick@users.noreply.github.com>
2022-11-15 08:10:44 -08:00
Michael 67294b0925 Tweak line wrappings in docs/storage.md
Signed-off-by: Michael <cloudyonspring@126.com>
2022-11-15 21:06:08 +08:00
Chance Feick 52270d6216 Fix relative link to use .md file extension
Signed-off-by: Chance Feick <cfeick@gitlab.com>
2022-11-14 13:30:22 -08: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