From f9fd610508656080e5f3aaefa2dd49a089508885 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 10 Jun 2024 22:43:45 +0200 Subject: [PATCH] feat(prometheus): write to remote --- knowledge base/prometheus.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/knowledge base/prometheus.md b/knowledge base/prometheus.md index eaa88ec..8ecc5ed 100644 --- a/knowledge base/prometheus.md +++ b/knowledge base/prometheus.md @@ -17,6 +17,7 @@ security policy. 1. [Local storage](#local-storage) 1. [External storage](#external-storage) 1. [Backfilling](#backfilling) +1. [Write to remote Prometheus servers](#write-to-remote-prometheus-servers) 1. [Management API](#management-api) 1. [Take snapshots of the data](#take-snapshots-of-the-data) 1. [Further readings](#further-readings) @@ -308,6 +309,27 @@ TODO TODO +## Write to remote Prometheus servers + +Also see [How to set up and experiment with Prometheus remote-write]. + +The remote server must accept incoming metrics.
+One way is to have it start with the `--web.enable-remote-write-receiver` option. + +Use the [`remote_write` setting][remote_write setting] to configure the sender to forward metrics to the receiver: + +```yaml +remote_write: + - url: http://prometheus.receiver.fqdn:9090/api/v1/write + - url: https://aps-workspaces.eu-east-1.amazonaws.com/workspaces/ws-01234567-abcd-1234-abcd-01234567890a/api/v1/remote_write + queue_config: + max_samples_per_send: 1000 + max_shards: 100 + capacity: 1500 + sigv4: + region: eu-east-1 +``` + ## Management API ### Take snapshots of the data @@ -372,6 +394,7 @@ All the references in the [further readings] section, plus the following: - [Set up prometheus and ingress on kubernetes] - [How to integrate Prometheus and Grafana on Kubernetes using Helm] - [node-exporter's helm chart's values] +- [How to set up and experiment with Prometheus remote-write]