Prometheus Remote Write
LOGIQ can collect Prometheus metrics from externally hosted Prometheus. LOGIQ uses the remote_write capabilities to help you do so.

Prometheus configuration

To send metrics from Prometheus to Logiq endpoint, use the configuration below.
1
remote_write:
2
- url: https://<Logiq-endpoint>/api/v1/receive
3
tls_config:
4
ca_file: <file-name>
5
cert_file: <file-name>
6
key_file: <file-name>
Copied!

OpenTelemetry configuration

Prometheus Remote Write Exporter can be leveraged to send OpenTelemetry metrics to Prometheus remote write compatible backends, and these metrics can be visualized on LOGIQ.
1
exporters:
2
prometheusremotewrite:
3
endpoint: "https://<logiq-endpoint>/api/v1/receive"
4
wal: # Enabling the Write-Ahead-Log for the exporter.
5
directory: ./prom_rw # The directory to store the WAL in
6
buffer_size: 100 # Optional count of elements to be read from the WAL before truncating; default of 300
7
truncate_frequency: 45s # Optional frequency for how often the WAL should be truncated. It is a time.ParseDuration; default of 1m
8
tls:
9
ca_file: <file-name>
10
cert_file: <file-name>
11
key_file: <file-name>
12
13
external_labels: #labels to identify the metric
14
label1: value1
15
16
receivers:
17
otlp:
18
protocols:
19
grpc:
20
http:
21
22
processors:
23
batch:
24
25
service:
26
pipelines:
27
metrics:
28
receivers: [otlp]
29
processors: [batch]
30
exporters: [prometheusremotewrite]
Copied!

VictoriaMetrics configuration

VictoriaMetrics is a fast, cost-effective, and scalable monitoring solution and time-series database. vmagent is an agent which helps you collect metrics from various sources and store them in VictoriaMetrics or any other Prometheus-compatible storage systems that support the remote_write protocol. VMagent has the ability to push metrics additionally to pulling them; push model is a traditional model of the client sending data to the server:
Run the vmagent as shown below and pass the below parameters
remoteWrite.tls.url=https://<Logiq-endpoint>/api/v1/receive
remoteWrite.tlsInsecureSkipVerify
1
./vmagent-prod -promscrape.config=/etc/prometheus/prometheus.yml -remoteWrite.url=https://<Logiq-endpoint>/api/v1/receive -remoteWrite.tlsInsecureSkipVerify
Copied!