move define for logs
This commit is contained in:
20
manifests/monitoring/log_targets.pp
Normal file
20
manifests/monitoring/log_targets.pp
Normal file
@@ -0,0 +1,20 @@
|
||||
## confdroid_alloy::monitoring::log_targets.pp
|
||||
# Module name: confdroid_alloy
|
||||
# @summary Adds log file targets to the Alloy configuration.
|
||||
# @param [Array[String]] targets Paths to log files to scrape.
|
||||
###############################################################################
|
||||
define confdroid_alloy::monitoring::log_targets (
|
||||
|
||||
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',
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user