Skip to content

Commit 881511c

Browse files
authored
Merge pull request #2047 from kube-logging/chore/fine-tune-fluentdpredictedbuffergrowth
chore: fine-tune FluentdPredictedBufferGrowth
2 parents 7935e02 + 9dcb0da commit 881511c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

e2e/logging_metrics_monitoring/logging_metrics_monitoring_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,18 @@ func installPrometheusOperator(c common.Cluster) error {
319319
return fmt.Errorf("failed to add prometheus-community repo: %v", err)
320320
}
321321

322+
if err := manager.RunRepo(helm.WithArgs("update")); err != nil {
323+
return fmt.Errorf("failed to update helm repos: %v", err)
324+
}
325+
322326
if err := manager.RunInstall(
323327
helm.WithName("prometheus"),
324328
helm.WithChart("prometheus-community/kube-prometheus-stack"),
325329
helm.WithArgs("--create-namespace"),
326330
helm.WithNamespace("monitoring"),
327331
helm.WithArgs("--set", "prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false"),
328332
helm.WithArgs("--set", "prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false"),
333+
helm.WithArgs("--set", "prometheus.prometheusSpec.maximumStartupDurationSeconds=900"),
329334
helm.WithWait(),
330335
); err != nil {
331336
return fmt.Errorf("failed to install prometheus: %v", err)

pkg/resources/fluentd/prometheusrules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (r *Reconciler) prometheusRules() (runtime.Object, reconciler.DesiredState,
121121
},
122122
{
123123
Alert: "FluentdPredictedBufferGrowth",
124-
Expr: intstr.FromString(fmt.Sprintf("sum(predict_linear(fluentd_output_status_buffer_total_bytes{%[1]s}[10m], 600)) > sum(fluentd_output_status_buffer_total_bytes{%[1]s}) * 1.5", nsJobLabel)),
124+
Expr: intstr.FromString(fmt.Sprintf("sum(predict_linear(fluentd_output_status_buffer_total_bytes{%[1]s}[10m], 600)) > sum(fluentd_output_status_buffer_total_bytes{%[1]s}) * 1.5 and sum(fluentd_output_status_buffer_total_bytes{%[1]s}) > 10 * 1024 * 1024", nsJobLabel)),
125125
For: prometheus_operator.Duration("10m"),
126126
Labels: map[string]string{
127127
"rulegroup": ruleGroupName,

0 commit comments

Comments
 (0)