summaryrefslogtreecommitdiffstats
path: root/exporting/prometheus/remote_write
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:20 +0000
commit386ccdd61e8256c8b21ee27ee2fc12438fc5ca98 (patch)
treec9fbcacdb01f029f46133a5ba7ecd610c2bcb041 /exporting/prometheus/remote_write
parentAdding upstream version 1.42.4. (diff)
downloadnetdata-386ccdd61e8256c8b21ee27ee2fc12438fc5ca98.tar.xz
netdata-386ccdd61e8256c8b21ee27ee2fc12438fc5ca98.zip
Adding upstream version 1.43.0.upstream/1.43.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'exporting/prometheus/remote_write')
l---------[-rw-r--r--]exporting/prometheus/remote_write/README.md61
-rw-r--r--exporting/prometheus/remote_write/remote_write.c4
2 files changed, 3 insertions, 62 deletions
diff --git a/exporting/prometheus/remote_write/README.md b/exporting/prometheus/remote_write/README.md
index c2ad22a6c..8ca4673a6 100644..120000
--- a/exporting/prometheus/remote_write/README.md
+++ b/exporting/prometheus/remote_write/README.md
@@ -1,60 +1 @@
-<!--
-title: "Export metrics to Prometheus remote write providers"
-description: "Send Netdata metrics to your choice of more than 20 external storage providers for long-term archiving and further analysis."
-custom_edit_url: "https://github.com/netdata/netdata/edit/master/exporting/prometheus/remote_write/README.md"
-sidebar_label: "Prometheus remote write"
-learn_status: "Published"
-learn_rel_path: "Integrations/Export"
--->
-
-# Export metrics to Prometheus remote write providers
-
-The Prometheus remote write exporting connector uses the exporting engine to send Netdata metrics to your choice of more
-than 20 external storage providers for long-term archiving and further analysis.
-
-## Prerequisites
-
-To use the Prometheus remote write API with [storage
-providers](https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage), install
-[protobuf](https://developers.google.com/protocol-buffers/) and [snappy](https://github.com/google/snappy) libraries.
-Next, [reinstall Netdata](https://github.com/netdata/netdata/blob/master/packaging/installer/REINSTALL.md), which detects that the required libraries and utilities
-are now available.
-
-## Configuration
-
-To enable data exporting to a storage provider using the Prometheus remote write API, run `./edit-config exporting.conf`
-in the Netdata configuration directory and set the following options:
-
-```conf
-[prometheus_remote_write:my_instance]
- enabled = yes
- destination = example.domain:example_port
- remote write URL path = /receive
-```
-
-You can also add `:https` modifier to the connector type if you need to use the TLS/SSL protocol. For example:
-`remote_write:https:my_instance`.
-
-`remote write URL path` is used to set an endpoint path for the remote write protocol. The default value is `/receive`.
-For example, if your endpoint is `http://example.domain:example_port/storage/read`:
-
-```conf
- destination = example.domain:example_port
- remote write URL path = /storage/read
-```
-
-You can set basic HTTP authentication credentials using
-
-```conf
- username = my_username
- password = my_password
-```
-
-`buffered` and `lost` dimensions in the Netdata Exporting Connector Data Size operation monitoring chart estimate uncompressed
-buffer size on failures.
-
-## Notes
-
-The remote write exporting connector does not support `buffer on failures`
-
-
+../integrations/prometheus_remote_write.md \ No newline at end of file
diff --git a/exporting/prometheus/remote_write/remote_write.c b/exporting/prometheus/remote_write/remote_write.c
index 2b53b1c20..ed431c9dc 100644
--- a/exporting/prometheus/remote_write/remote_write.c
+++ b/exporting/prometheus/remote_write/remote_write.c
@@ -139,11 +139,11 @@ struct format_remote_write_label_callback {
void *write_request;
};
-static int format_remote_write_label_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) {
+static int format_remote_write_label_callback(const char *name, const char *value, RRDLABEL_SRC ls __maybe_unused, void *data)
+{
struct format_remote_write_label_callback *d = (struct format_remote_write_label_callback *)data;
if (!should_send_label(d->instance, ls)) return 0;
-
char k[PROMETHEUS_ELEMENT_MAX + 1];
char v[PROMETHEUS_ELEMENT_MAX + 1];