Commit graph

758 commits

Author SHA1 Message Date
Jan Fajerski b4152309a4 Merge branch 'main' into 3.0-main-sync
Conflicts:
  promql/engine_test.go
    Resolved by picking main changes but adjusting total_samples for
    query "max_over_time(metricWith1HistogramEvery10Seconds[60s])[20s:5s]"
    to 312. Via https://github.com/prometheus/prometheus/pull/13662 this
    histogram now stores 13 values per timestamp, but via
    https://github.com/prometheus/prometheus/pull/13904 the range query
    is now left-open.
  promql/promqltest/testdata/functions.test
    Resolved by picking changes in main. See also
    https://github.com/prometheus/prometheus/pull/13662, but adjust some
    range selectors (`s/1m/2m/`) to account for
    https://github.com/prometheus/prometheus/pull/13904.
  promql/promqltest/testdata/histograms.test
    Resolved by picking changes in main. See also
    https://github.com/prometheus/prometheus/pull/13662, but adjust some
    range selectors (`s/5m/10m/`) to account for
    https://github.com/prometheus/prometheus/pull/13904.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-07-03 09:45:25 +02:00
Paulo Dias f4b1fcb73e
discovery: add support for gathering flavor name in Openstack discovery (#14312)
* feat: add support for gathering flavor name in Openstack discovery

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

* Update instance.go

Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Paulo Dias <44772900+paulojmdias@users.noreply.github.com>

* Update configuration.md

Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Paulo Dias <44772900+paulojmdias@users.noreply.github.com>

* fix: fix linting

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

* fix: fix instance type

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

* Update docs/configuration/configuration.md

Co-authored-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Paulo Dias <44772900+paulojmdias@users.noreply.github.com>

---------

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <44772900+paulojmdias@users.noreply.github.com>
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2024-06-30 19:18:18 +02:00
Rick Rackow 9290d1308d
fix(docs/querying): explain ceil behaviour more explicitly with examples (#11987)
* fix(docs/querying): explain `ceil` behaviour more explicitly with examples

Signed-off-by: Rick Rackow <rick.rackow@gmail.com>

* fix(docs/querying): explain `floor` behaviour more explicitly with examples

Signed-off-by: Rick Rackow <rick.rackow@paymenttools.com>

---------

Signed-off-by: Rick Rackow <rick.rackow@gmail.com>
Signed-off-by: Rick Rackow <rick.rackow@paymenttools.com>
Co-authored-by: Rick Rackow <rick.rackow@paymenttools.com>
2024-06-28 22:18:04 +02:00
Bryan Boreham c5040c5ea9
Merge pull request #10490 from DrAuYueng/fix-docker-sd-service-missing
[ENHANCEMENT] Docker SD: add MatchFirstNetwork for containers with multiple networks

Fixes docker sd service misssing in shared mode and deduplicate targets by network
2024-06-26 12:33:50 +01:00
Charles Korn 2dd07fbb1b
notifier: optionally drain queued notifications before shutting down (#14290)
* Add draining of queued notifications to `notifier.Manager`

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Update docs

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Address PR feedback

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Add more logging

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Address offline feedback: remove timeout

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Ensure stopping takes priority over further processing, make tests more robust

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Make channel unbuffered

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Update docs

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Fix race in test

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Remove unnecessary context

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Make Stop safe to call multiple times

Signed-off-by: Charles Korn <charles.korn@grafana.com>

---------

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-06-26 11:32:04 +01:00
unknown 0d25931049 rebase main and adjust the configuration
Signed-off-by: ouyang1204@gmail.com <ouyang1204@gmail.com>
2024-06-21 19:10:18 +08:00
Zhang Zhanpeng debbdb8608 make matrix selection and lookback left-open and right-closed
Signed-off-by: Zhang Zhanpeng <zhangzhanpeng.zzp@alibaba-inc.com>
Signed-off-by: beorn7 <beorn@grafana.com>
Co-authored-by: beorn7 <beorn@grafana.com>
2024-06-20 22:05:40 +08:00
akunszt 2aaf99dd0a
discovery: aws: expose Primary IPv6 addresses as label, partially fixes #7406 (#14156)
* discovery: aws: expose Primary IPv6 addresses as label

Add __meta_ec2_primary_ipv6_addresses label. This label contains the
Primary IPv6 address for every ENI attached to the EC2 instance. It is
ordered by the DeviceIndex and the missing elements (interface without
Primary IPv6 address) are kept in the list.

---------

Signed-off-by: Arpad Kunszt <akunszt@hiya.com>
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
2024-06-20 14:36:20 +01:00
anarcat 545d31f184
docs: clarify backup requirements for storage (#14297)
* clarify backup requirements for storage

After reading this (again) recently, I was under the impression that our backup strategy ("just throw Bacula at it") was just not good enough and that our backups were inconsistent. I filed [an issue internally][41627] about this because of that concern.

But reading a conversation with @SuperQ on IRC, I came under the impression that only the WAL files would be lost. This is an attempt at documenting this more clearly.

[41627]: https://gitlab.torproject.org/tpo/tpa/team/-/issues/41627
---------

Signed-off-by: anarcat <anarcat@users.noreply.github.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2024-06-19 07:46:13 +02:00
Rens Groothuijsen 1c3f322f78
docs: mention implicitly watched directories in documentation (#14019)
* docs: mention implicitly watched directories in documentation

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

* Add mention of atomic file renaming

Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

---------

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Co-authored-by: Björn Rabenstein <beorn@grafana.com>
2024-06-18 13:51:47 +02:00
Sebastian Rabenhorst 05380aa0ac
agent db: make rejecting ooo samples configurable (#14094)
feat: Make OOO ingestion time window configurable for Prometheus Agent.

Signed-off-by: Sebastian Rabenhorst <sebastian.rabenhorst@shopify.com>
2024-06-12 11:07:42 -03:00
Ben Kochie 7f0caf7229
Merge pull request #14285 from prometheus/superq/tune_gogc
Tune default GOGC
2024-06-11 11:14:50 +02:00
SuperQ ea2b39a31e
Tune default GOGC
Adjust the default GOGC value to 75. This is less of a memory savings,
but has less impact on CPU use.

Signed-off-by: SuperQ <superq@gmail.com>
2024-06-11 03:44:06 +02:00
Rens Groothuijsen 19fd5212c3
docs: clarify default Docker command line parameters (#14194)
* docs: clarify default Docker command line parameters

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

* docs: move Docker command line parameters section and refer to Dockerfile

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

* Add link to Dockerfile in documentation

Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>

---------

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
2024-06-10 20:16:02 +02:00
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
Charles Korn 24ef000025
Merge branch 'main' into sort-matrix-series
# Conflicts:
#	promql/engine_test.go
2024-05-31 12:44:27 +10: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
Björn Rabenstein 1081e336a0
Merge pull request #14129 from prometheus/beorn7/doc
doc: Clarify the limits of dumping/backfilling via OpenMetrics
2024-05-23 13:37:42 +02:00
Björn Rabenstein 5c85a55e3f
Merge pull request #14120 from kushalShukla-web/remote
added some lines prometheus.md and main.go
2024-05-21 17:49:33 +02:00
beorn7 3127a4029e doc: Clarify the limits of dumping/backfilling via OpenMetrics
This is about native histograms (not yet supported) and staleness
markers (for which OpenMetrics support isn't even planned).

Signed-off-by: beorn7 <beorn@grafana.com>
2024-05-21 14:50:06 +02:00
Björn Rabenstein 3119b8a055
Merge pull request #13218 from machine424/ro-promtool
Make DBReadOnly more RO
2024-05-21 13:27:40 +02:00
kushagra Shukla 0fea1065fe added line When set, query.max-concurrency may need to be adjusted accordingly. Signed-off-by: kushagra Shukla <kushalshukla110@gmail.com>
Signed-off-by: kushagra Shukla <kushalshukla110@gmail.com>
2024-05-18 07:26:59 -04:00
Charles Korn 76b1237215
Document sorting behaviour
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-05-17 13:54:08 +10: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
Kushal shukla d2caf51874
removed formateoverview section (#13994)
docs: Remove outdated information about remote-read API

---------

Signed-off-by: kushagra Shukla <kushalshukla110@gmail.com>
Signed-off-by: Kushal shukla <85934954+kushalShukla-web@users.noreply.github.com>
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
Co-authored-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2024-05-03 09:42:39 -03: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
Arthur Silva Sens 34ee8c6078
Merge pull request #13982 from tesla59/tesla/storage-doc
docs: storage.md: clarify storage.tsdb.retention.time description
2024-04-29 15:33:27 -03: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
Nishant Singh c8b23980c9
Update docs/storage.md
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Nishant Singh <nishant@heim.id>
2024-04-27 13:50:50 +05:30
Nishant Singh 801314901c
Update docs/storage.md
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Nishant Singh <nishant@heim.id>
2024-04-27 13:50:41 +05:30
tesla59 5e638b7f44 docs: storage.md: clarify storage.tsdb.retention.time description
Signed-off-by: tesla59 <nishant@heim.id>
2024-04-24 02:58:25 +05:30
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
machine424 c5a1cc9148
chore(tsdb): add a sandboxDir to DBReadOnly, the directory can be used for transient file writes.
use it in loadDataAsQueryable to make sure the RO Head doesn't truncate or cut new chunks in data/chunks_head/.

add a -sandbox-dir-root flag to "promtool tsdb dump/dump-openmetrics" to control the root of that sandbox dirrectory.

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-04-15 17:00:25 +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
Julien 48c8ec19bc
Merge pull request #13882 from prometheus/update-featureflag-docs
Update documentation about existing feature-flags
2024-04-05 11:22:46 +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
Arthur Silva Sens db64d2dcdc
Update documentation about existing feature-flags
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2024-04-02 19:18:57 -03: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
thirdkeyword 5fc1bf1bf0 docs: fix some typos
Signed-off-by: thirdkeyword <fliterdashen@gmail.com>
2024-03-06 20:55:35 +08: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
Kartikay 8736772053
web/api: add limit param on series, labels, label-values (#13396)
Support limit parameter in queries to restrict output data to the specified size, on the following endpoints:

/api/v1/series
/api/v1/labels
/api/v1/label/:name:/values

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
Signed-off-by: Kartikay <kartikay_2101ce32@iitp.ac.in>
2024-02-29 15:31:13 +00:00
machine424 4b71f6ffc2
promtool: add a "tsdb dump-openmetrics" to dump in OpemMetrics format.
This closes the loop, as the output can be fed into "tsdb create-blocks-from openmetrics"

Native histograms are not supported.

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-02-28 15:34:18 +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
Bryan Boreham c0e36e6bb3 Standardise exemplar label as "trace_id"
This is consistent with the OpenTelemetry standard, and an example in OpenMetrics.

https://github.com/open-telemetry/opentelemetry-specification/blob/89aa01348139/specification/metrics/data-model.md#exemplars
https://github.com/OpenObservability/OpenMetrics/blob/138654493130/specification/OpenMetrics.md#exemplars-1

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-15 14:20:08 +00:00
pschou b66b0a5288
docs: improve "Querying Prometheus" readability (#8492)
Signed-off-by: schou <pschou@users.noreply.github.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-09 17:37:14 +00:00