2026-10-04 15:37:02 +02:00
|
|
|
## confdroid_alloy::monitoring::log_targets.pp
|
2026-10-04 15:13:44 +02:00
|
|
|
# Module name: confdroid_alloy
|
|
|
|
|
# @summary Adds log file targets to the Alloy configuration.
|
|
|
|
|
# @param [Array[String]] targets Paths to log files to scrape.
|
|
|
|
|
###############################################################################
|
2026-10-04 15:37:02 +02:00
|
|
|
define confdroid_alloy::monitoring::log_targets (
|
2026-10-04 15:13:44 +02:00
|
|
|
|
|
|
|
|
Array[String] $targets = [],
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
if $confdroid_alloy::params::ay_manage_loki == true and $targets != [] {
|
|
|
|
|
$log_targets_array = $targets
|
|
|
|
|
|
|
|
|
|
concat::fragment { "log_targets_${name}":
|
|
|
|
|
target => $confdroid_alloy::params::ay_main_file,
|
|
|
|
|
content => template('confdroid_alloy/log_targets.alloy.erb'),
|
|
|
|
|
order => '020',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|