Multiple remote_write

19 views
Skip to first unread message

Ramachandra Bhaskar Ayalavarapu

unread,
Jul 1, 2020, 10:44:33 AM7/1/20
to Prometheus Users
Hello

Is it possible for a single Prometheus to have multiple remote_write adapters depending on jobs ?
For example job1 should be writing to r1 (cortex) and r2 to another remote_write instance ?


Another problem I face is certain jobs only need to do remote_write and certain jobs locally. Please let me know if that’s possible at job level

Christian Hoffmann

unread,
Jul 1, 2020, 11:56:10 AM7/1/20
to Ramachandra Bhaskar Ayalavarapu, Prometheus Users
Hi,

On 7/1/20 4:44 PM, Ramachandra Bhaskar Ayalavarapu wrote:
> Is it possible for a single Prometheus to have multiple remote_write adapters depending on jobs ?
> For example job1 should be writing to r1 (cortex) and r2 to another remote_write instance ?
Although I'm not using it: As far as I understand, multiple remote write
configs are supported.
Each remote write config can have write_relabel_configs which allow you
to filter what to send. This works per-remote write target.

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write

> Another problem I face is certain jobs only need to do remote_write and certain jobs locally. Please let me know if that’s possible at job level
Yes, this should be possible using the same mechanism by filtering on
the job label.

Kind regards,
Christian

Brian Candler

unread,
Jul 1, 2020, 12:03:34 PM7/1/20
to Prometheus Users
Remote writes can be filtered using write_relabel_configs. See:
and in particular the "drop" action.  You can filter by any labels, including job.

You can't disable local writing.  Prometheus uses it for alert rules and recording rules.
Reply all
Reply to author
Forward
0 new messages