OP#830 add loki management
This commit is contained in:
@@ -11,4 +11,8 @@ class confdroid_ntp::main::config (
|
||||
if $cy_manage_nagios == true {
|
||||
include confdroid_ntp::monitoring::target
|
||||
}
|
||||
|
||||
if $cy_manage_loki == true {
|
||||
include confdroid_ntp::monitoring::loki
|
||||
}
|
||||
}
|
||||
|
||||
14
manifests/monitoring/loki.pp
Normal file
14
manifests/monitoring/loki.pp
Normal file
@@ -0,0 +1,14 @@
|
||||
#### confdroid_ntp::monitoring::loki.pp
|
||||
# Module name: confdroid_ntp
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages loki monitoring for the confdroid_ntp services
|
||||
###############################################################################
|
||||
class confdroid_ntp::monitoring::loki (
|
||||
|
||||
) inherits confdroid_ntp::params {
|
||||
if $cy_manage_loki == true {
|
||||
confdroid_loki::log_targets { "confdroid_ntp_${fqdn}":
|
||||
log_target => ['/var/log/chrony/*.log'],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
# @param [String] cy_target_service Path to the Nagios service configuration file.
|
||||
# @param [Array] cy_target_contacts List of Nagios contacts for notifications.
|
||||
# must exist in Nagios contacts configuration!
|
||||
# @param [Boolean] cy_manage_loki Whether to manage Loki logging for the module.
|
||||
###############################################################################
|
||||
class confdroid_ntp::params (
|
||||
|
||||
@@ -46,6 +47,9 @@ class confdroid_ntp::params (
|
||||
String $cy_target_service = '/etc/nagios/conf.d/chronyd_service.cfg',
|
||||
Array $cy_target_contacts = ['nagiosadmin'],
|
||||
|
||||
# loki
|
||||
Boolean $cy_manage_loki = false,
|
||||
|
||||
) {
|
||||
# facts
|
||||
$fqdn = $facts['networking']['fqdn']
|
||||
|
||||
Reference in New Issue
Block a user