Commit Graph

458 Commits

Author SHA1 Message Date
Filip Petkovski 4855a0c067
Allow escaping a dollar sign when expanding external labels (#10129)
* Allow escaping a dollar sign when expanding external labels

There is currently no mechanism to natively escape a dollar sign
in the os.Expand function. As a workaround, this commit modifies
the external label expansion logic to treat a double dollar ($$)
as a mechanism for escaping the dollar character.

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2022-01-17 16:43:55 +01:00
Ben Kochie 30e2c81c97
Merge pull request #10143 from prometheus/superq/regex_highlight
Make regex-matching docs more obvious
2022-01-15 08:35:26 +01:00
SuperQ a3dd323a53
Make regex-matching docs more obvious
Split out the note about regex-matching into a separate paragraph to
make it more obvious. Move it up, closer to the definition.

Signed-off-by: SuperQ <superq@gmail.com>
2022-01-14 23:18:31 +01:00
Juozas Vainauskas ad6ae2cccc Update getting started guide with the new UI
Signed-off-by: Juozas Vainauskas <vainauskasjuozas@gmail.com>
2022-01-14 23:14:55 +02:00
Rodrigo Queiro 70c1446a64
Clarify units of --storage.tsdb.retention.size (#10154)
The flag uses Base2Bytes: 129ed4ec8b/cmd/prometheus/main.go (L1476)

Signed-off-by: Rodrigo Queiro <rodrigoq@google.com>
2022-01-13 00:55:57 +01:00
Björn Rabenstein 933f50bcda
Merge pull request #10121 from prometheus/beorn7/promql
PromQL: Promote negative offset and @ modifer to stable
2022-01-12 14:09:46 +01:00
Abhishek 2f4289a3bf
add limit to the rules api (#10152) 2022-01-11 22:44:22 -05:00
beorn7 b39f2739e5 PromQL: Always enable negative offset and @ modifier
This follows the line of argument that the invariant of not looking
ahead of the query time was merely emerging behavior and not a
documented stable feature. Any query that looks ahead of the query
time was simply invalid before the introduction of the negative offset
and the @ modifier.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-01-11 17:08:55 +01:00
beorn7 61509fc840 PromQL: Promote negative offset and @ modifer to stable
Following the argument that breaking the invariant that PromQL does
not look ahead of the evaluation time implies a breaking change, we
still need to keep the feature flag around, but at least we can
communicate that the feature is considered stable, and that the
feature flags will be ignored from v3 on.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-01-11 00:34:33 +01:00
beorn7 8fdfa52976 API: Promote remote-write-receiver to stable
Since `/api/v1/write` is a mutating endpoint, we should still activate
the remote-write-receiver explicitly. But we should do it in the same
way as the other mutating endpoints, i.e. via a flag
`--web.enable-remote-write-receiver`.

This commit marks the feature flag as deprecated, i.e. it still works
but logs a warning on startup. This enables users to seamlessly
migrate. With the next minor release, we can start ignoring the
feature flag (but still warn a user that is trying to use it).

Signed-off-by: beorn7 <beorn@grafana.com>
2022-01-05 15:36:07 +01:00
uesyn 13af2470bf
Add stripPort to template function (#10002)
* template: add `stripPort` to template functions

Signed-off-by: GitHub <suemura@zlab.co.jp>
2021-12-16 09:27:31 +00:00
Julien Pivotto 2366d23036 Format endpointslice documentation like other sections
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-12-14 13:43:15 +01:00
fpetkovski de87515b24 Implement target discovery in own k8s namespace
This commit adds support for discovering targets from the same
Kubernetes namespace as the Prometheus pod itself. Own-namespace
discovery can be indicated by using "." as the namespace.

Fixes #9782

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2021-12-14 13:41:38 +01:00
Ed Schouten a3e9628e0c
Kubernetes service discovery: add provider ID label (#9603)
When using Kubernetes on cloud providers, nodes will have the
spec.providerID field populated to contain the cloud provider specific
name of the EC2/GCE/...  instance.

Let's expose this information as an additional label, so that it's
easier to annotate metrics and alerts to contain the cloud provider
specific name of the instance to which it pertains.

Signed-off-by: Ed Schouten <eschouten@apple.com>
2021-12-06 22:27:11 +01:00
XU 3563db20e0
Fix docs/configuration typo (#9922)
Signed-off-by: qqbuby <qqbuby@gmail.com>
2021-12-06 16:21:48 +05:30
Callum Styan 086ca90b24
Update exemplar docs based on changes to exemplar storage configuration (#9868)
* Update exemplar docs based on changes from #8974

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Fix missing code block closing + unindent one level.

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2021-12-01 10:30:08 +01:00
teuto.net Netzdienste GmbH 3ce6b48df6
fixes wrong metric name in documentation (#9828)
* fixes wrong metric name, see https://github.com/prometheus/prometheus/blob/main/discovery/openstack/hypervisor.go#L35

Signed-off-by: teuto.net Netzdienste GmbH <github@teuto.net>

* fixes parameter doc, sorted alphabetically

Signed-off-by: teuto.net Netzdienste GmbH <github@teuto.net>
2021-11-19 15:06:01 -05:00
Hu Shuai 5a9be19062
Fix a typo and the grammar in docs/configuration/configuration.md (#9717) 2021-11-11 07:10:40 -05:00
David Leadbeater c0c5f3227b Update to return a float
Signed-off-by: David Leadbeater <dgl@dgl.cx>
2021-11-10 18:35:30 +01:00
David Leadbeater 89ebb3dcf2 Add parseDuration to template functions
This can be useful when generating rules, a query may use a duration,
and it may be useful to template that into a URL parameter. Therefore
this allows interfacing with systems that don't implement Prometheus
style duration parsing.

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2021-11-10 18:35:30 +01:00
Bryan Boreham 1ed94142fc
remote-write: slow down retries to avoid DDOS (#9634)
* remote-write: slow down retries to avoid DDOS

Increase the default max retry time from 100ms to 5 seconds.

Remote write calls are retried after a recoverable error such as the
back-end returning 500. Prometheus waits the minimum time and retries,
then doubles the wait on each subsequent retry until the maximum is
reached.

If some data is still getting through, remote-write will also increase
shards, and the default maximum is 200. 200 shards sending every 100ms
is 20 calls per second, to a back-end that is already in trouble.

5 seconds was chosen to match the default BatchSendDeadline: if we can
afford to wait that long for no response, then we can wait the same time
to retry. We will reach 5 seconds after 9 successive failures.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Update config doc for max_backoff change

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2021-11-09 14:08:24 -08:00
Julien Pivotto 807f46a1ed
Gate agent behind a feature flag, valide mode flags (#9620)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-11-02 13:03:35 +00:00
Furkan Türkal a6e6011d55
Add scrape_body_size_bytes metric (#9569)
Fixes #9520

Signed-off-by: Furkan <furkan.turkal@trendyol.com>
2021-10-24 23:45:31 +02:00
Levi Harrison d81bbe154d
Rule alerts/series limit updates (#9541)
* Add docs and do not limit inactive alerts.

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-10-21 23:14:17 +02:00
Julian Wiedmann 18886c33c2
docs/operators: fix a typo (#9559)
s/are preserved the output/are preserved in the output

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
2021-10-21 14:35:52 +02:00
Julien Pivotto 77f411b2ec
Enable tls_config in oauth2 (#9550)
* Enable tls_config in oauth2

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-10-20 23:10:18 +02:00
Levi Harrison 89a6ebd799
Add common HTTP client to Azure SD (#9267)
* Add `proxy_url` option to Azure SD

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-10-20 23:09:58 +02:00
Julien Pivotto 432005826d
Add a feature flag to enable the new discovery manager (#9537)
* Add a feature flag to enable the new manager

This PR creates a copy of the legacy manager and uses it by default.

It is a companion PR to #9349. With this PR, users can enable the new
discovery manager and provide us with any feedback / side effects that
the new behaviour might have.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-10-20 10:15:54 +02:00
Julien Pivotto df1bae0514
Add support for security-related HTTP headers (#9546)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-10-19 21:26:52 +02:00
Witek Bedyk cda2dbbef6
Add Uyuni service discovery (#8190)
* Add Uyuni service discovery

Signed-off-by: Witek Bedyk <witold.bedyk@suse.com>

Co-authored-by: Joao Cavalheiro <jcavalheiro@suse.de>
Co-authored-by: Marcelo Chiaradia <mchiaradia@suse.com>
Co-authored-by: Stefano Torresi <stefano@torresi.io>
Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
2021-10-19 01:00:44 +02:00
la3mmchen 6d3a4ed711 fix/9269 add documentation for endpointslice
This commits add a documentation for the kubernetes_sd_configs: endpointslice feature.

Signed-off-by: la3mmchen <alex@k3wl.net>
2021-10-03 21:30:39 +02:00
Ivana Huckova a069e7ec80
Update api.md (#9429)
Fix timestamp in example in exemplars query. The year was `020` instead of `2020`.

Signed-off-by: Ivana <ivana.huckova@gmail.com>
2021-10-03 12:22:47 +02:00
Levi Harrison a7de0cf276 Remove example and experimental
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-27 07:00:08 -04:00
Levi Harrison a16a4cad2d Add example
Credit goes to @leonerd for the original example

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-26 16:35:02 -04:00
Levi Harrison 2f896c98ff Address review comments
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-26 15:45:25 -04:00
Levi Harrison a283b52e8c Added unit
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-23 10:30:46 -04:00
Levi Harrison be6ce7bcc2 Add docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-23 10:30:46 -04:00
sennatitcomb 9e7ae7b9ac Typo fixes
Signed-off-by: sennatitcomb <senna.titcomb@intel.com>
2021-09-17 15:48:02 -07:00
Julien Pivotto 8920024323 Add PuppetDB service discovery
We have been Puppet user for 10 years and we are users of
https://github.com/camptocamp/prometheus-puppetdb-sd

However, that file_sd implementation contains business logic and
assumptions around e.g. the modules which you are using.

This pull request adds a simple PuppetDB service discovery, which will
enable more use cases than the upstream sd.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-09-16 16:54:26 +02:00
Levi Harrison 6faca22eec Add inverse hyperbolic functions
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 74faea64dd Removed specification of pi digits
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 53d88fd147 Added hyperbolic trig functions
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 51bb3d4a27 Changed radian wording
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 535d8904f7 Link to docs for special cases
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison e5a44964ff Added docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:09 -04:00
Levi Harrison dc2f1993d8
Limit number of alerts or series produced by a rule (#9260)
* Add limit to rules

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 09:48:26 +02:00
Dean Meehan 5751bfb61f Removed Duplication Typo (to to)
Signed-off-by: Dean Meehan <dean@dean.technology>
2021-09-13 19:34:07 +01:00
Łukasz Mierzwa f0a26266c0 Add scrape_sample_limit metric
This adds a new metric exposing per target scrape sample_limit value. Metrics are only exposed if extra-scrape-metrics feature flag is enabled.
scrape_sample_limit will make it easy to monitor and alert on targets getting close to configured sample_limit, which is important given than exceeding sample_limit results in the entire scrape results being rejected.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2021-09-03 15:42:41 +01:00
SuperQ 31f4108758
Add scrape_timeout_seconds metric
Add a new built-in metric `scrape_timeout_seconds` to allow monitoring
of the ratio of scrape duration to the scrape timeout. Hide behind a
feature flag to avoid additional cardinality by default.

Signed-off-by: SuperQ <superq@gmail.com>
2021-09-02 12:15:35 +02:00
Levi Harrison 70f597b033
Configure Scrape Interval and Timeout Via Relabeling (#8911)
* Configure scrape interval and timeout with labels

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-31 17:37:32 +02:00