From eab95a5b5493de2ee792a06883b9b80e1b2f2df3 Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Tue, 1 Sep 2026 11:34:57 +0200 Subject: [PATCH] OP#662 add flags for queue_config --- manifests/params.pp | 6 ++++++ templates/config.alloy.erb | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/manifests/params.pp b/manifests/params.pp index f2ef870..a8b7cd4 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -14,6 +14,9 @@ # timestamps in prometheus metrics # @param [Boolean] ay_prom_track_timestamps_staleness whether to track timestamps # staleness in prometheus metrics +# @param [String] ay_prom_max_shards the maximum number of shards to use for prometheus metrics +# @param [String] ay_prom_max_samples_per_send the maximum number of samples to send +# @param [String] ay_prom_batch_send_deadline the maximum time to wait before sending # @summary Class contains all parameters for the confdroid_alloy module. ############################################################################## class confdroid_alloy::params ( @@ -33,6 +36,9 @@ class confdroid_alloy::params ( String $ay_prom_url = 'https://prometheus.example.net/api/v1/write', Boolean $ay_prom_honor_timestamps = true, Boolean $ay_prom_track_timestamps_staleness = true, + String $ay_prom_max_shards = '10', + String $ay_prom_max_samples_per_send = '2000', + String $ay_prom_batch_send_deadline = '5s', ) { # service diff --git a/templates/config.alloy.erb b/templates/config.alloy.erb index 2bccb68..23753d0 100644 --- a/templates/config.alloy.erb +++ b/templates/config.alloy.erb @@ -94,6 +94,11 @@ prometheus.remote_write "prometheus" { username = "<%= @ay_loki_username %>" password = "<%= @ay_loki_userpass %>" } + queue_config { + max_shards = <%= @ay_prom_max_shards %> + max_samples_per_send = <%= @ay_prom_max_samples_per_send %> + batch_send_deadline = <%= @ay_prom_batch_send_deadline %> + } } } <% end %> \ No newline at end of file