Commit graph

403 commits

Author SHA1 Message Date
John Carlo Roberto 924ba90c3f
Add link to best practices in "Defining Recording Rules" page (#11696)
* docs: Add link to best practices in "Defining Recording Rules" page

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

* docs: Improve wording

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

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

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

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

* Azure -> AWS

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

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

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

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

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

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

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-10-14 23:23:20 +02:00
Björn Rabenstein 1c798ec930
doc: Add notes about feature not yet supported for native histograms (#11453)
Namely federation and recording rules.

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

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

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

Signed-off-by: Brian Candler <b.candler@pobox.com>
2022-09-19 22:14:55 +02:00
Julien Pivotto 15fa34936b
PuppetDB SD: Add __meta_puppetdb_query label (#11238)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-01 17:05:54 +02:00
Frederic Branczyk 0683348121
Merge pull request #11140 from mercedes-benz/export-external-ip
Add LoadBalancerIP to discovered services
2022-08-12 10:48:59 +02:00
Levi Harrison bf264f2021
Add pod_container_image label to docs (#11146)
Signed-off-by: Levi Harrison <git@leviharrison.dev>

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

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

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

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

Co-authored-by: yngwiewang <yngwiewang@163.com>
2022-07-29 03:39:03 +02:00
Jonathan K. Stevens ce1bf8b15a
template: adding formatTime function to TemplateExpander (#10993)
Signed-off-by: Jonathan Stevens <jonathanstevens89@gmail.com>
Signed-off-by: Jonathan Stevens <jon.stevens@getweave.com>

Co-authored-by: Jonathan Stevens <jon.stevens@getweave.com>
2022-07-14 23:45:32 +02:00
Levi Harrison 08f3ddb864
Sparse histogram remote-write support (#11001) 2022-07-14 09:13:12 -04:00
Julien Pivotto cf0fdd557e
docs: Change relabelling -> relabeling (#11006)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-07-14 13:49:30 +02:00
Wen Long 409a5e7922
docs: correct the accepted value for X-XSS-Protection header (#11015)
Signed-off-by: heylongdacoder <heylongdacoder@gmail.com>
2022-07-14 00:50:02 +02:00
Julien Pivotto 875c4aa12e
Merge pull request #10915 from attachmentgenie/nomad_sd
feat(nomad): add nomad service discovery
2022-06-30 15:26:20 +02:00
renzheng.wang db2614102f
add description for __meta_kubernetes_endpoints_label_* and __meta_kubernetes_endpoints_labelpresent_* (#10911)
* add description for __meta_kubernetes_endpoints_label_* and __meta_kubernetes_endpoints_labelpresent_*

Signed-off-by: renzheng.wang <wangrzneu@gmail.com>
2022-06-30 18:22:53 +05:30
Julien Pivotto d9347bf128 nomad: Fix documentation and comments.
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-06-30 14:19:55 +02:00
Bram Vogelaar 4456dcc26e feat(nomad): add nomad service discovery
Signed-off-by: Bram Vogelaar <bram@attachmentgenie.com>
2022-06-30 14:17:08 +02:00
A. Gavin 8f16cc99ec
docs: clarify supported tls cipher suites (#10903)
Signed-off-by: Alex Gavin <a_gavin@icloud.com>
2022-06-30 11:34:49 +02:00
Filip Petkovski 05da373dcb
kubernetes_sd: Allow attaching node labels for endpoint role
The Kubernetes service discovery can only add node labels to
targets from the pod role.

This commit extends this functionality to the endpoints and
endpointslices roles.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2022-06-16 12:22:55 +02:00
Hu Shuai 31cffd9e92
Fix a small typo (#10771)
Signed-off-by: Hu Shuai <hus.fnst@fujitsu.com>
2022-06-01 12:31:18 +10:00
Julien Pivotto 1afe72f0af vultr: ram is in mb, not bytes
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-05-24 18:38:06 +02:00
Julien Pivotto c9d4e5fc94 vultr: minor fixups
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-05-24 18:38:06 +02:00
David Dymko 3ef153b00c vultr integration
Signed-off-by: David Dymko <dymkod@gmail.com>
2022-05-24 18:38:06 +02:00
Felix Ehrenpfort ce3bc818a8
Add service discovery for IONOS Cloud (#10514)
* Add service discovery for IONOS Cloud

Signed-off-by: Felix Ehrenpfort <felix@ehrenpfort.de>
2022-05-20 14:57:23 +02:00
Julien Pivotto 71dbb4d091
Add lowercase and uppercase relabel action (#10641)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-05-03 10:09:53 +02:00
Ziqi Zhao 74e5b596da
add stripDomain to template function (#10475)
* add stripDomain to template function

Signed-off-by: Ziqi Zhao <zzqwf12345@163.com>
2022-04-27 11:30:05 +02:00
Julien Pivotto 9fcf0b3d46
Merge pull request #10616 from prometheus/release-2.35
Release 2.35
2022-04-21 14:17:08 +02:00
Joker b2c21433eb
Fix exemplar docs. (#10609)
Signed-off-by: Joker <joker9764@126.com>
2022-04-21 10:15:14 +02:00
Julien Pivotto 09da88114d Support overriding minimum TLS version
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-20 23:41:30 +02:00
Julien Pivotto 98039cddfa
Update Prometheus common (#10492)
* Update Prometheus common

- Oauth2 supports proxy URL
- HTTP2 can be disabled

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-03-30 12:49:03 +02:00
David N Perkins b13aec9167
Merge pull request #10365 from David-N-Perkins/azure-resource-group-filter
Azure Service Discovery resource group filter
2022-03-29 01:21:23 +02:00
Ben Kochie c7be45d957
Merge pull request #10297 from prometheus/superq/improve_labelmap_doc
Improve wording of labelmap action
2022-03-25 11:53:40 +01:00
fpetkovski eb5512555d
Update docs
Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2022-03-10 08:47:04 +01:00
fpetkovski fa798d3042
Allow attaching node metadata
Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2022-03-10 08:40:52 +01:00
Ujjwal Goyal 9e7ae4d963
Use containers labels instead of task labels from Docker Swarm SD (#9187) (#10311)
* Remove task labels from Docker Swarm SD (#9187)

Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>

Add container labels to Docker Swarm SD (#9187)

Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>

* Reorder labels in configuration doc

Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>
2022-03-08 14:49:20 +01:00
David N Perkins 097b359b41
Added a failure counter to the HTTP service discovery (#10372)
* Added a failure counter to the http service discovery

Signed-off-by: David N Perkins <David.N.Perkins@ibm.com>
2022-03-08 14:10:45 +01:00
Richard Hartmann b9a1b00475
Update docs/configuration/configuration.md
Co-authored-by: Levi Harrison <git@leviharrison.dev>
2022-03-04 20:50:51 +01:00
Matej Gera 0acbe5e3f5
Tracing: Add additional options to align with the upstream exporter (#10276)
* Enhance configuration

Signed-off-by: Matej Gera <matejgera@gmail.com>
2022-02-22 17:07:30 +01:00
DrAuYueng 5a6e26556b
Add an option to use the external labels as selectors for the remote read endpoint (#10254)
* An option to ignore external_labels

Signed-off-by: DrAuYueng <ouyang1204@gmail.com>
2022-02-16 22:12:47 +01:00
SuperQ 3b082e48a1
Improve wording of labelmap action
Update the wording of the `labelmap` relabel action to make it more
clear that it acts on all the label names, rather than the list provided
by source_labels.

Signed-off-by: SuperQ <superq@gmail.com>
2022-02-14 15:31:51 +01:00
Robert Jacob 277bf93952
Fix documentation for Docker API filters (#10252)
* Fix documentation for Docker API filters

Signed-off-by: Robert Jacob <xperimental@solidproject.de>

* Undo indentation change

Signed-off-by: Robert Jacob <xperimental@solidproject.de>
2022-02-03 23:57:02 +01:00
David N Perkins 4d61baa3e4
Added pathPrefix function to the template reference documentation (#10222)
* Added pathPrefix function to the template reference documentation

Signed-off-by: David N Perkins <David.N.Perkins@ibm.com>

* PR suggestions

Signed-off-by: David N Perkins <David.N.Perkins@ibm.com>

* Switch wording back

Signed-off-by: David N Perkins <David.N.Perkins@ibm.com>
2022-02-03 16:41:31 +01:00
Julien Pivotto 8cb733d04c
Followup on OpenTelemetry migration (#10203)
* Followup on OpenTelemetry migration

- tracing_config: Change with_insecure to insecure, default to false.
- tracing_config: Call SetDirectory to make TLS certificates relative to the Prometheus
  configuration
- documentation: Change bool to boolean in the configuration
- documentation: document type float
- tracing: Always restart the tracing manager when TLS config is set to
  reload certificates
- tracing: Always set TLS config, which could be used e.g. in case of
  potential redirects.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>\\
2022-01-29 23:56:44 +01:00
Mike d53324825b
optimize doc (#10219)
Signed-off-by: mikechengwei <842725815@qq.com>
2022-01-28 13:29:25 +01:00
Matej Gera 2c61d29b2a
Tracing: Migrate to OpenTelemetry library (#9724)
Signed-off-by: Matej Gera <matejgera@gmail.com>
2022-01-25 11:08:04 +01:00
Levi Harrison 9bdd2d0ffd
Merge pull request #10197 from LeviHarrison/fix-azure-http-client-typo
Fix typo in Azure SD configuration
2022-01-25 00:14:22 +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
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
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 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
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 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
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
Julien Pivotto cab96a06ef
Merge release 2.29 in main (#9196)
* PromQL: Fix start and end keywords masking label and metric names

This commit fixes an issue with the "at modifier" that introduced two
new keywords: `start` and `end`. In grouping options and in metric
names, these keywords took precedence over metric or label names, so
that those metrics and labels could no longer be referenced.

Signed-off-by: Clayton Peters <clayton.peters@man.com>

* Add in additional tests for metrics and/or labels called start/end.

Signed-off-by: Clayton Peters <clayton.peters@man.com>

* *: Cut 2.29.0-rc.0

Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>

* VERSION: bump to 2.29.0-rc.0

Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>

* Remove experimental wording on size-based retention

Followup of #9004

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Fix PR reference in changelog

Signed-off-by: George Brighton <george@gebn.co.uk>

* Describe EC2 availability zone IDs at most once per refresh (#9142)

Signed-off-by: George Brighton <george@gebn.co.uk>

* Describe EC2 availability zones at most once per SD load

Closes #9142.

Signed-off-by: George Brighton <george@gebn.co.uk>

* Incorporate feedback

Signed-off-by: George Brighton <george@gebn.co.uk>

* Integrate feedback

Signed-off-by: George Brighton <george@gebn.co.uk>

* Add a compatibility note for macOS users.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* *: Cut v2.29.0-rc.1

Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>

* Fix `kuma_sd` targetgroup reporting (#9157)

* Bundle all xDS targets into a single group

Signed-off-by: austin ce <austin.cawley@gmail.com>

* *: cut v2.29.0-rc.2

Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>

* Rename links

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

* bump codemirror-promql to 0.17.0

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* *: cut v2.29.0

Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>

* tsdb: align atomically accessed int64 (#9192)

This prevents a panic in 32-bit archs:
https://pkg.go.dev/sync/atomic#pkg-note-BUG

Fixed #9190

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Release 2.29.1 (#9193)

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

Co-authored-by: Clayton Peters <clayton.peters@man.com>
Co-authored-by: Frederic Branczyk <fbranczyk@gmail.com>
Co-authored-by: George Brighton <george@gebn.co.uk>
Co-authored-by: Austin Cawley-Edwards <austin.cawley@gmail.com>
Co-authored-by: Levi Harrison <git@leviharrison.dev>
Co-authored-by: Augustin Husson <husson.augustin@gmail.com>
2021-08-12 18:38:06 +02:00
TJ Hoplock 7baf084092
optimize Linode SD by polling for event changes during refresh (#8980)
* optimize Linode SD by polling for event changes during refresh

Most accounts are fairly "static", in the sense that they're not cycling
through instances constantly. So rather than do a full refresh every
interval and potentially make several behind-the-scenes paginated API
calls, this will now poll the `/account/events/` endpoint every minute
with a list of events that we care about. If a matching event is found,
we then do a full refresh.

Co-authored-by: William Smith <wsmith@linode.com>
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
Signed-off-by: William Smith <wsmith@linode.com>
2021-08-04 12:05:49 +02:00
Julien Pivotto 03bee3b5df
Merge pull request #9125 from LeviHarrison/docker_sd-host-networking
docker_sd: Support host network mode
2021-08-04 01:14:39 +02:00
Levi Harrison c1b1b826ce HostNetworkHost -> HostNetworkingHost
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-03 05:58:49 -06:00
Julien Pivotto 24165adadc
Merge pull request #9112 from darshanime/add_computer_name
Add computer name to azure sd
2021-07-30 09:58:49 +02:00
Levi Harrison 3556302c76
Added docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-07-27 23:33:40 -04:00
Levi Harrison a8850a0819
Add note to docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>

Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-07-27 13:43:52 -04:00
Julien Pivotto dcba645366
Merge pull request #8978 from jfreeland/feat/additional-gce-interfaces
feat: explicit gce interface ipv4 address metadata
2021-07-26 19:38:59 +02:00
darshanime c8a2ffdb72 Add computer name to azure sd
Signed-off-by: darshanime <deathbullet@gmail.com>
2021-07-25 22:07:44 +05:30
Julien Pivotto 79d354ad2e
Merge pull request #8844 from austince/feat/discovery-xds
Add base xDS REST SD and kuma_sd implementation
2021-07-23 09:46:36 +02:00
George Brighton bc0e76c8a3
Add AZ ID label to discovered EC2 targets (#8896)
* Add AZ ID to EC2 SD

Signed-off-by: George Brighton <george@gebn.co.uk>
2021-07-23 09:42:03 +02:00
austin ce 3593b20cdb
Add documentation for kuma_sd configuration
Signed-off-by: austin ce <austin.cawley@gmail.com>
2021-07-21 12:55:02 -04:00
Arunprasad Rajkumar 83a56e22ab
docs: update unit_testing_rules to cover missing and stale samples (#9065)
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-07-19 15:46:14 +05:30
Lukas Kämmerling 263847e64a
hcloud discovery: Add new labelpresent label (#9028)
* Add new labelpresent label

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2021-07-03 01:51:50 +02:00
Joey Freeland 8017dd7242 chore: always append interface ipv4 with api interface name
Signed-off-by: Joey Freeland <joey@free.land>
2021-06-29 09:01:34 -07:00
Levi Harrison d5c3c567d3
Remote Write: Add max samples per metadata send (#8959)
* Added MaxSamplesPerSend

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

* Added tests

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

* Fixed order of require

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

* Added docs

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

* writes -> writesReceived

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

* Improved send loop

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-06-24 15:39:50 -07:00
Joey Freeland 77e25cf2e5 feat: gce metadata for additional interfaces
Signed-off-by: Joey Freeland <joey@free.land>
2021-06-21 21:37:04 -07:00
3Xpl0it3r a0bac4b488
add kubeconfig support in discovery module (#8811)
Signed-off-by: 3Xpl0it3r <shouc.wang@hotmail.com>
2021-06-17 12:41:50 +02:00
Frederic Branczyk 039b651450
Merge pull request #8916 from Evesy/main
Add class label to kubernetes ingress discovery
2021-06-14 13:40:08 +02:00
koolwithk 80d69dd4e5
Docs - fix wrong spell 2021-06-14 09:38:06 +05:30
Levi Harrison faed8df31d
Enable reading consul token from file (#8926)
* Adopted common http client

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-06-12 00:06:59 +02:00
Julien Pivotto 9444698ae2
http_sd (#8839)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-06-11 18:04:45 +02:00
Mike Eves 7e1111ff14 Update label from class to class_name
Signed-off-by: Mike Eves <michael.eves@autotrader.co.uk>
2021-06-11 13:45:41 +01:00
Mike Eves aab51ffe2a Tweak docs
Signed-off-by: Mike Eves <michael.eves@autotrader.co.uk>
2021-06-11 11:27:15 +01:00
Mike Eves 22b16c30de Fix typo
Signed-off-by: Mike Eves <michael.eves@autotrader.co.uk>
2021-06-11 11:27:15 +01:00
Mike Eves 7e65ad3e43 Add class label to kubernetes ingress discovery
Signed-off-by: Mike Eves <michael.eves@autotrader.co.uk>
2021-06-11 11:27:15 +01:00
Frederic Hemberger 39a87fd9d2 consul_sd: Add namespace support for Consul Enterprise
Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
2021-06-09 16:35:02 +02:00
Julien Pivotto 6cbed8c569
Merge pull request #8878 from LeviHarrison/external-address-alerts
Access external address in alerts
2021-06-04 09:14:25 +02:00
Julien Pivotto 609ba54b8f
Mark body_size_limit as experimental. (#8886)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-06-02 16:32:08 +01:00
Julien Pivotto 20c6739adc
Merge pull request #8833 from hanjm/feature/add-scape-read-body-limit
Add body_size_limit to prevent bad targets response large body cause Prometheus server OOM (#8827)
2021-06-02 09:24:59 +02:00
TJ Hoplock dc22c65349
Add Linode Service Discovery (#8846)
* Add Linode Service Discovery

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2021-06-01 20:32:36 +02:00
Levi Harrison 51e4e2a526
Updated docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-05-30 23:36:05 -04:00
hanjm 1df05bfd49 Add body_size_limit to prevent bad targets response large body cause Prometheus server OOM (#8827)
Signed-off-by: hanjm <hanjinming@outlook.com>
2021-05-29 07:05:42 +08:00
Sandro 0ffcddbee8
Fix indentation
Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
2021-05-16 05:27:05 +02:00
Callum Styan 8fd73b1d28
Add Exemplar Remote Write support (#8296)
* Write exemplars to the WAL and send them over remote write.

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

* Update example for exemplars, print data in a more obvious format.

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

* Add metrics for remote write of exemplars.

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

* Fix incorrect slices passed to send in remote write.

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

* We need to unregister the new metrics.

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

* Address review comments

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

* Order of exemplar append vs write exemplar to WAL needs to change.

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

* Several fixes to prevent sending uninitialized or incorrect samples with an exemplar. Fix dropping exemplar for missing series. Add tests for queue_manager sending exemplars

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Store both samples and exemplars in the same timeseries buffer to remove the alloc when building final request, keep sub-slices in separate buffers for re-use

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Condense sample/exemplar delivery tests to parameterized sub-tests

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Rename test methods for clarity now that they also handle exemplars

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Rename counter variable. Fix instances where metrics were not updated correctly

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Add exemplars to LoadWAL benchmark

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

* last exemplars timestamp metric needs to convert value to seconds with
ms precision

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

* Process exemplar records in a separate go routine when loading the WAL.

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

* Address review comments related to clarifying comments and variable
names. Also refactor sample/exemplar to enqueue prompb types.

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

* Regenerate types proto with comments, update protoc version again.

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

* Put remote write of exemplars behind a feature flag.

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

* Address some of Ganesh's review comments.

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

* Move exemplar remote write feature flag to a config file field.

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

* Address Bartek's review comments.

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

* Don't allocate exemplar buffers in queue_manager if we're not going to
send exemplars over remote write.

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

* Add ValidateExemplar function, validate exemplars when appending to head
and log them all to WAL before adding them to exemplar storage.

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

* Address more reivew comments from Ganesh.

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

* Add exemplar total label length check.

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

* Address a few last review comments

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

Co-authored-by: Martin Disibio <mdisibio@gmail.com>
2021-05-06 13:53:52 -07:00
Damien Grisonnet b50f9c1c84
Add label scrape limits (#8777)
* scrape: add label limits per scrape

Add three new limits to the scrape configuration to provide some
mechanism to defend against unbound number of labels and excessive
label lengths. If any of these limits are broken by a sample from a
scrape, the whole scrape will fail. For all of these configuration
options, a zero value means no limit.

The `label_limit` configuration will provide a mechanism to bound the
number of labels per-scrape of a certain sample to a user defined limit.
This limit will be tested against the sample labels plus the discovery
labels, but it will exclude the __name__ from the count since it is a
mandatory Prometheus label to which applying constraints isn't
meaningful.

The `label_name_length_limit` and `label_value_length_limit` will
prevent having labels of excessive lengths. These limits also skip the
__name__ label for the same reasons as the `label_limit` option and will
also make the scrape fail if any sample has a label name/value length
that exceed the predefined limits.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

* scrape: add metrics and alert to label limits

Add three gauge, one for each label limit to easily access the
limit set by a certain scrape target.
Also add a counter to count the number of targets that exceeded the
label limits and thus were dropped. This is useful for the
`PrometheusLabelLimitHit` alert that will notify the users that scraping
some targets failed because they had samples exceeding the label limits
defined in the scrape configuration.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

* scrape: apply label limits to __name__ label

Apply limits to the __name__ label that was previously skipped and
truncate the label names and values in the error messages as they can be
very very long.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

* scrape: remove label limits gauges and refactor

Remove `prometheus_target_scrape_pool_label_limit`,
`prometheus_target_scrape_pool_label_name_length_limit`, and
`prometheus_target_scrape_pool_label_value_length_limit` as they are not
really useful since we don't have the information on the labels in it.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-05-06 09:56:21 +01:00
Levi Harrison fa184a5fc3
Add OAuth 2.0 Config (#8761)
* Introduced oauth2 config into the codebase

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-04-28 14:47:52 +02:00
n888 7c028d59c2
Add lightsail service discovery (#8693)
Signed-off-by: N888 <drifto@gmail.com>
2021-04-28 11:29:12 +02:00
Julien Pivotto ea6f6bba74
Enable parsing strings in humanize functions (#8682)
* Enable parsing strings in humanize functions

This is useful to humanize count_values or buckets labels.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-04-14 00:30:15 +02:00
Robert Jacob b253056163
Implement Docker discovery (#8629)
* Implement Docker discovery

Signed-off-by: Robert Jacob <xperimental@solidproject.de>
2021-03-29 22:30:23 +02:00
Julien Pivotto 5a6d244b00 Scaleway SD: Add the ability to read token from file
Prometheus adds the ability to read secrets from files. This add
this feature for the scaleway service discovery.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-25 00:52:33 +01:00
Andrew Starr-Bochicchio da8a8585f5 Add vpc label to docs.
Signed-off-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
2021-03-24 17:05:16 -04:00
Julien Pivotto 49016994ac Switch to alertmanager api v2
According to the 2.25 release notes, 2.26 should switch to alertmanager
api v2 by default.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-20 01:01:10 +01:00
Julien Pivotto bab0fb81ef Rename to or ID
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-12 23:53:08 +01:00
Julien Pivotto d1c8550894 Scaleway SD: Add more labels to the instance role
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-12 01:04:15 +01:00
Rémy Léone f690b811c5
add support for scaleway service discovery (#8555)
Co-authored-by: Patrik <patrik@ptrk.io>
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>

Signed-off-by: Rémy Léone <rleone@scaleway.com>
2021-03-10 15:10:17 +01:00
Julien Pivotto f2fc05fd5f
Merge pull request #8569 from roidelapluie/fix-default-resolution
Fix subqueries with default resolution in promql unit tests
2021-03-08 20:44:09 +01:00
Robert Fratto 5b78aa0649
Contribute grafana/agent sigv4 code (#8509)
* Contribute grafana/agent sigv4 code
* address review feedback
  - move validation logic for RemoteWrite into unmarshal
  - copy configuration fields from ec2 SD config
  - remove enabled field, use pointer for enabling sigv4
* Update config/config.go
* Don't provide credentials if secret key / access key left blank
* Add SigV4 headers to the list of unchangeable headers.
* sigv4: don't include all headers in signature
* only test for equality in the authorization header, not the signed date
* address review feedback
  1. s/httpClientConfigEnabled/httpClientConfigAuthEnabled
  2. bearer_token tuples to "authorization"
  3. Un-export NewSigV4RoundTripper
* add x-amz-content-sha256 to list of unchangeable headers
* Document sigv4 configuration
* add suggestion for using default AWS SDK credentials

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
2021-03-08 12:20:09 -07:00
Julien Pivotto 5742a18590 Fix subqueries with default resolution in promql unit tests
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-07 09:20:04 +01:00
Julien Pivotto 93c6139bc1 Support follow_redirect
This PR introduces support for follow_redirect, to enable users to
disable following HTTP redirects.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-26 22:50:56 +01:00
Harkishen-Singh 79ba53a6c4 Custom headers on remote-read and refactor implementation to roundtripper.
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
2021-02-26 17:20:29 +05:30
Julien Pivotto 8787f0aed7 Update common to support credentials type
Most of the backwards compat tests is done in common.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-18 23:28:22 +01:00
Julien Pivotto 5f92a82ca7
Merge pull request #8477 from Harkishen-Singh/configure-rate-limit-via-config
Configure retry on Rate-Limiting from remote-write config
2021-02-16 20:11:52 +01:00
Matteo Valentini 5628ed3c34 Update docs/configuration/configuration.md
Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
Signed-off-by: Matteo Valentini <matteo.valentini@nethesis.it>
2021-02-16 11:23:55 +01:00
Matteo Valentini 44b78ef318 Add image name meta label to DO service discovery
The label `__meta_digitalocean_image` expose the `slug` of the image and
the `slug` is only present in the public images.
To refer a user-generated image (`snapshot` or `custom`) we can use
the image's display name.

See: https://developers.digitalocean.com/documentation/v2/#images

Signed-off-by: Matteo Valentini <matteo.valentini@nethesis.it>
2021-02-16 11:05:14 +01:00
Harkishen-Singh 77c20fd2f8 Adds support to configure retry on Rate-Limiting from remote-write config.
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
2021-02-16 14:52:49 +05:30
beorn7 ae900a117f Recommend to get promtool from a binary distribution.
Rather than compile it yourself, which doesn't work as shown anymore
because of Go Modules.

Signed-off-by: beorn7 <beorn@grafana.com>
2021-02-15 21:59:32 +01:00
Julien Pivotto e29b47b39e
Merge pull request #8440 from mishamo/master
Add optional name property to testgroup for better test failure output
2021-02-09 21:23:24 +01:00
misha 1c3e7b4241 Use strings.Builder for neater error formatting
Signed-off-by: misha <DL-OTTCloudPlatform-Nova@bskyb.internal>
2021-02-09 15:00:26 +00:00
Nándor István Krácser 509000269a
remote_write: allow passing along custom HTTP headers (#8416)
* remote_write: allow passing along custom HTTP headers

Signed-off-by: Nandor Kracser <bonifaido@gmail.com>

* add warning

Signed-off-by: Nandor Kracser <bonifaido@gmail.com>

* remote_write: add header valadtion

Signed-off-by: Nandor Kracser <bonifaido@gmail.com>

* extend tests for bad remote write headers

Signed-off-by: Nandor Kracser <bonifaido@gmail.com>

* remote_write: add note about the authorization header

Signed-off-by: Nandor Kracser <bonifaido@gmail.com>
2021-02-04 14:18:13 -07:00
Julien Pivotto b7fe028740
Merge pull request #8373 from hs0210/work
Fix a typo in docs/configuration/configuration.md
2021-01-18 08:24:05 +01:00
Hu Shuai 2d8738c947 Fix a typo in docs/configuration/configuration.md
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2021-01-18 10:14:47 +08:00
Julien Pivotto 5bd7145e55
Merge pull request #8327 from roidelapluie/tlsexemple
https: Add example configuration file
2021-01-15 09:50:52 +01:00
Julien Pivotto 08c259cda6 https: Add example configuration file
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-01-15 01:37:50 +01:00
Julien Pivotto 438ab463ad Fix link in documentation
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-01-04 01:12:47 +01:00
Julien Pivotto c04284ff90 Add https and authentication to the navbar
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-01-04 01:12:47 +01:00
Julien Pivotto 5b4f46a348 Add TLS and basic authentication
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-12-28 21:33:44 +01:00
Julien Pivotto 87e142c02f
remote_write documentation: fix blank lines (#8264)
The blank line is not efficiently placed in the remote_write config,
affecting readability.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-12-08 14:27:50 +01:00
Thibault Jamet f055690b34
Clarify: all rules in a group are concomitant (#8248)
Improve the documentation to clarify the differences beetween rules in a
group and outside a group.

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2020-12-03 10:32:10 +00:00