Send Prometheus metrics to Promscale
You can configure Prometheus to use Promscale as a remote storage. Open the Prometheus configuration file and add or edit these lines:
important
We highly recommend that you set Prometheus to query data from Promscale for all PromQL queries. To do this, set the parameter to true
.
Configure Prometheus for better performance with Promscale
Remote-write performance is dependent on queue_config
. Changing values in queue_config
allows you to change the remote-write component for different scenarios. For most cases, these settings work well:
remote_write:
queue_config:
max_samples_per_send: 10000
This section contains further explanation of each parameter.
Set with the remote_timeout
field in remote_write
.
This parameter corresponds to the timeout value of HTTP requests, which carry the samples batch to the remote storage. If Promscale is far from where Prometheus is deployed, or you have a high cardinality of data being ingested, you can set this to remote_timeout: 100s
. However, higher values for remote_timeout
can be considered, based on the requirements.
Maximum samples per send
This parameter is the maximum number of samples that can fit in a single write request to the remote storage system. Samples batch less than max_samples_per_send
are sent only when batch_send_deadline
expires. Promscale performs better with larger batches, so set the default to .