diff --git a/class/defaults.yml b/class/defaults.yml index 82e6027..6b91e13 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -12,11 +12,6 @@ parameters: channel: 'stable-${openshift4_logging:version}' alerts: 'release-${openshift4_logging:version}' - ignore_alerts: - - ElasticsearchHighFileDescriptorUsage - - ElasticsearchOperatorCSVNotSuccessful - - FluentdQueueLengthIncreasing - components: lokistack: enabled: true @@ -109,6 +104,15 @@ parameters: schedule: '*/10 * * * *' sleep_time: 2m + ignore_alerts: + - ElasticsearchHighFileDescriptorUsage + - ElasticsearchOperatorCSVNotSuccessful + - FluentdQueueLengthIncreasing + + patch_alerts: + FluentdQueueLengthIncreasing: + for: '12h' + openshift4_elasticsearch_operator: targetNamespaces: - ${openshift4_logging:namespace} diff --git a/component/alertrules.libsonnet b/component/alertrules.libsonnet index 6a6843d..2182703 100644 --- a/component/alertrules.libsonnet +++ b/component/alertrules.libsonnet @@ -41,11 +41,7 @@ local ignore_alerts = std.set( // Provide partial objects for alert rules that need to be tuned compared to // upstream. The keys in this object correspond to the `alert` field of the // rule for which the patch is intended. -local patch_alerts = { - FluentdQueueLengthIncreasing: { - 'for': '12h', - }, -}; +local patch_alerts = params.patch_alerts; local loadFile(file) = local fpath = 'openshift4-logging/component/extracted_alerts/%s/%s' % [ params.alerts, file ]; diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index 177b50c..1d96b31 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -80,6 +80,22 @@ This parameter can be used to disable alerts provided by openshift cluster-loggi The component supports removing entries in this parameter by providing the entry prefixed with `~`. +== `patch_alerts` + +[horizontal] +type:: dictionary +default:: ++ +[source,yaml] +---- +patch_alerts: + FluentdQueueLengthIncreasing: + for: '12h' +---- + +The parameter patch_alerts allows users to customize upstream alerts. + + == `components.elasticsearch` [horizontal]