Commit graph

382 commits

Author SHA1 Message Date
SuperQ 68ba6c1ae5
Add configuration option for GOGC
Add the ability to adjust the `GOGC` variable from the Prometheus
configuration file.
* Create a new top-level `runtime` section in the config.
* Adjust from the Go default of 100 to 50 to reduce wasted memory.
* Use the `GOGC` env value if no configuraiton is used.

Signed-off-by: SuperQ <superq@gmail.com>
2024-06-05 15:23:16 +02:00
gotjosh 37b408c6cd
Feature: Allow configuration of a rule evaluation delay (#14061)
* [PATCH] Allow having evaluation delay for rule groups

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* [PATCH] Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* [PATCH] Move the option to ManagerOptions

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* [PATCH] Include evaluation_delay in the group config

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix comments

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Add a server configuration option.

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Appease the linter #1

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Add the new server flag documentation

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Improve documentation of the new flag and configuration

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Use named parameters for clarity on the `Rule` interface

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Add `initial` to the flag help

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Change the CHANGELOG area from `ruler` to `rules`

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Rename evaluation_delay to `rule_query_offset`/`query_offset` and make it a global configuration option.

Signed-off-by: gotjosh <josue.abreu@gmail.com>

E Your branch is up to date with 'origin/gotjosh/evaluation-delay'.

* more docs

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Improve wording on CHANGELOG

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Add `RuleQueryOffset` to the default config in tests in case it changes

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Update docs/configuration/recording_rules.md

Co-authored-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Rename `RuleQueryOffset` to `QueryOffset` when in the group context.

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* Improve docstring and documentation on the `rule_query_offset`

Signed-off-by: gotjosh <josue.abreu@gmail.com>

---------

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Julius Volz <julius.volz@gmail.com>
2024-05-30 11:49:50 +01:00
Simon Pasquier e6f1f7e32d
docs/configuration: clarify OpenStack metadata labels (#14149)
On several occasions, users assumed that the
`__meta_openstack_tag_<key>` labels were about tags [1] instead of
metadata [2]. While we can't really change the Prometheus label name, we
can at least clarify in the documentation what's the information carried
in the label.

[1] https://specs.openstack.org/openstack/api-wg/guidelines/tags.html
[2] https://docs.openstack.org/api-ref/compute/#server-metadata-servers-metadata

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-05-27 18:25:02 +02:00
Julien edf5ebd844
Merge pull request #13970 from jiekun/doc/ovh-dedicated-server-label
docs: [ovh sd] Added missing label for OVH dedicated server in SD
2024-05-16 12:19:06 +02:00
Bryan Boreham 67326d8e5c
Merge pull request #13758 from nemobis/federicol-remotewrite-tuning
[DOCS] Remote-Write: Clarify batch_send_deadline docs
2024-05-14 12:28:19 +01:00
Jiekun 0cd3a22a18
docs: [ovh sd] Added missing label for OVH dedicated server in service discovery doc
Signed-off-by: Jiekun <zhujiekun@52tt.com>
2024-04-30 17:35:28 +08:00
Heyoxe f7e923c3bb
fix(scaleway-sd): use public IPs if no private IP present (#13941)
* fix(scaleway-sd): use public IPs if no private IP present
* tests(scaleway-sd): add instance  with routed public ip and no private ip

---------

Signed-off-by: Heyoxe <32708033+Heyoxe@users.noreply.github.com>
2024-04-27 15:01:30 +01:00
Simon Pasquier 7704cde4ea
discovery(k8s): add metadata labels to endpointslices
This commit adds 2 new metadata labels for the endpointslice role:
* `__meta_kubernetes_endpointslice_endpoint_node_name`
* `__meta_kubernetes_endpointslice_endpoint_zone`

The latter is only present when the `discovery.k8s.io/v1` API group is
available.

I also updated the configuration doc and added an entry for the
`__meta_kubernetes_endpointslice_endpoint_hostname` label which was
missing.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-04-17 11:20:19 +02:00
Björn Rabenstein 4ec5c25393
Merge pull request #13731 from suntala/suntala/native-histogram-template
histograms: support expansion of native histogram values in templating
2024-04-11 13:24:26 +02:00
Sven Dewit dc7d3fbc3c fix: scrape_config/interval relabelling is not experimental any more
Signed-off-by: Sven Dewit <sven.dewit@1und1.de>
2024-04-05 12:22:16 +02:00
dandrucz 38b75bc0d7
Linode IPv6 Range support, Optional region filtering, Missing fields in Documentation fixed (#13774)
* Add support for discovering Linode IPv6 ranges associated with linodes.
* Add optional but recommended region filtering (faster queries, more relevant information).
* Added missing fields in configuration.md, updated linode test cases.
* Convert to TableDrivenTests as per tjhop request.

Signed-off-by: David Andruczyk <dandrucz@akamai.com>
2024-04-05 09:31:59 +01:00
suntala 9a7c6a5cc4 Support native histogram values in template functions
Co-authored-by: Aleks Fazlieva <britishrum@users.noreply.github.com>
Signed-off-by: suntala <arati.rana@grafana.com>
2024-03-26 22:30:01 +01:00
Federico Leva 2aab70b839 Clarify batch_send_deadline docs
This is the time period covered by a batch of samples, when the
number of waiting samples is lower than max_samples_per_send.
It does not affect timeouts or retries.

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Federico Leva <federico.leva@relexsolutions.com>
2024-03-26 17:18:46 +02:00
Jan-Otto Kröpke 302e151de8
{discovery,remote_write}/azure: Support default SDK authentication (#13099)
* discovery/azure: Offer default SDK authentication

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2024-03-16 11:06:57 +00:00
Julien 88622cfa2c
Merge pull request #12551 from nabokihms/alertmanager-relabeling-config
Route different alerts to different alertmanagers
2024-03-04 16:45:00 +01:00
Raúl Naveiras 58f528dcbc
[docs] Update remote write queue defaults
Update docs to reflect the default values in the
`config.DefaultQueueConfig`

Signed-off-by: Raúl Naveiras <me@raulnaveiras.com>
2024-02-26 15:59:29 +00:00
Ziqi Zhao df2a0ecf3b
Native Histograms: support native_histogram_min_bucket_factor in scrape_config (#13222)
Native Histograms: support native_histogram_min_bucket_factor in scrape_config

---------

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
2024-01-17 16:58:54 +01:00
Marc Tudurí 78c5ce3196
Drop old inmemory samples (#13002)
* Drop old inmemory samples

Co-authored-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Avoid copying timeseries when the feature is disabled

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Run gofmt

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Clarify docs

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Add more logging info

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Remove loggers

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* optimize function and add tests

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Simplify filter

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* rename var

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Update help info from metrics

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* use metrics to keep track of drop elements during buildWriteRequest

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* rename var in tests

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* pass time.Now as parameter

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Change buildwriterequest during retries

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Revert "Remove loggers"

This reverts commit 54f91dfcae20488944162335ab4ad8be459df1ab.

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* use log level debug for loggers

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Fix linter

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove noisy debug-level logs; add 'reason' label to drop metrics

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove accidentally committed files

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Propagate logger to buildWriteRequest to log dropped data

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Fix docs comment

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Make drop reason more specific

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove unnecessary pass of logger

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Use snake_case for reason label

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Fix dropped samples metric

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

---------

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
Co-authored-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Co-authored-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2024-01-05 10:40:30 -08:00
Marcin Skalski 19709f75d0 fix kuma_sd docs
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
2023-12-12 14:49:43 +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
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
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
Ł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 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
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
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 a8cdb7eb6c
Merge branch 'main' into template_reference
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-09-26 13:49:58 +02: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
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
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
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
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
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
Julien Pivotto 53d7aac39e
Merge pull request #12281 from jlosito/patch-1
Update configuration.md
2023-06-27 13:14:26 +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
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
renzheng.wang 98ffad01b8 update tests and docs
Signed-off-by: renzheng.wang <wangrzneu@gmail.com>
2023-05-30 20:13:52 +08:00