From 386eaf0f3364caab3192c92e46882fca8c71ee97 Mon Sep 17 00:00:00 2001 From: Jens Erat Date: Wed, 30 Oct 2024 13:39:30 +0100 Subject: [PATCH] expose fluentd metrics also on IPv6 Currently, IPv6 only clusters cannot scrape metrics from fluentd, as fluentd's `bind` default is `0.0.0.0`. Any IPv6 only cluster will fail scrapes. fluentd currently does not support binding both IPv6 and IPv4 in a single source. Adding a second IPv6 source makes fluentd listen on both IPv4 and IPv6, allowing scrapes universally. Fixes #1835 Signed-off-by: Jens Erat --- pkg/resources/fluentd/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/resources/fluentd/config.go b/pkg/resources/fluentd/config.go index 132f0fe26..f8eef3bf6 100644 --- a/pkg/resources/fluentd/config.go +++ b/pkg/resources/fluentd/config.go @@ -63,6 +63,15 @@ var fluentdInputTemplate = ` metrics_path {{ .Monitor.Path }} {{- end }} + + @type prometheus + @id in_prometheus6 + bind "::" + port {{ .Monitor.Port }} +{{- if .Monitor.Path }} + metrics_path {{ .Monitor.Path }} +{{- end }} + @type prometheus_monitor