From 38415ba6be404a9c5fbf56aef9817aff2177fc73 Mon Sep 17 00:00:00 2001 From: karan k Date: Fri, 21 Jul 2023 17:49:18 +0530 Subject: [PATCH] Add support for prometheus expoter output plugin Signed-off-by: karan k --- .../fluentbit/v1alpha2/clusteroutput_types.go | 2 + .../plugins/output/prometheus_exporter.go | 45 +++++++++++++++++ .../plugins/output/zz_generated.deepcopy.go | 27 ++++++++++ .../v1alpha2/zz_generated.deepcopy.go | 30 +++++++++++ .../fluentbit.fluent.io_clusteroutputs.yaml | 25 ++++++++++ .../crds/fluentbit.fluent.io_outputs.yaml | 25 ++++++++++ .../fluentbit-clusterinput-metrics.yaml | 14 ++++++ .../fluentbit-output-prometheus-exporter.yaml | 15 ++++++ charts/fluent-operator/values.yaml | 15 ++++++ .../fluentbit.fluent.io_clusteroutputs.yaml | 25 ++++++++++ .../bases/fluentbit.fluent.io_outputs.yaml | 25 ++++++++++ go.mod | 4 ++ go.sum | 11 ++++ manifests/setup/fluent-operator-crd.yaml | 50 +++++++++++++++++++ manifests/setup/setup.yaml | 50 +++++++++++++++++++ 15 files changed, 363 insertions(+) create mode 100644 apis/fluentbit/v1alpha2/plugins/output/prometheus_exporter.go create mode 100644 charts/fluent-operator/templates/fluentbit-clusterinput-metrics.yaml create mode 100644 charts/fluent-operator/templates/fluentbit-output-prometheus-exporter.yaml diff --git a/apis/fluentbit/v1alpha2/clusteroutput_types.go b/apis/fluentbit/v1alpha2/clusteroutput_types.go index b1e78f448..2248f9802 100644 --- a/apis/fluentbit/v1alpha2/clusteroutput_types.go +++ b/apis/fluentbit/v1alpha2/clusteroutput_types.go @@ -92,6 +92,8 @@ type OutputSpec struct { OpenSearch *output.OpenSearch `json:"opensearch,omitempty"` // OpenTelemetry defines OpenTelemetry Output configuration. OpenTelemetry *output.OpenTelemetry `json:"opentelemetry,omitempty"` + // PrometheusExporter_types defines Prometheus exporter configuration to expose metrics from Fluent Bit. + PrometheusExporter *output.PrometheusExporter `json:"prometheusExporter,omitempty"` // PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. PrometheusRemoteWrite *output.PrometheusRemoteWrite `json:"prometheusRemoteWrite,omitempty"` // S3 defines S3 Output configuration. diff --git a/apis/fluentbit/v1alpha2/plugins/output/prometheus_exporter.go b/apis/fluentbit/v1alpha2/plugins/output/prometheus_exporter.go new file mode 100644 index 000000000..994472aad --- /dev/null +++ b/apis/fluentbit/v1alpha2/plugins/output/prometheus_exporter.go @@ -0,0 +1,45 @@ +package output + +import ( + "fmt" + + "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins" + "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins/params" +) + +// +kubebuilder:object:generate:=true + +// PrometheusExporter An output plugin to expose Prometheus Metrics.
+// The prometheus exporter allows you to take metrics from Fluent Bit and expose them such that a Prometheus instance can scrape them.
+// **Important Note: The prometheus exporter only works with metric plugins, such as Node Exporter Metrics**
+// **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/outputs/prometheus-exporter** +type PrometheusExporter struct { + // IP address or hostname of the target HTTP Server, default: 0.0.0.0 + Host string `json:"host"` + // This is the port Fluent Bit will bind to when hosting prometheus metrics. + // +kubebuilder:validation:Minimum:=1 + // +kubebuilder:validation:Maximum:=65535 + Port *int32 `json:"port,omitempty"` + //This allows you to add custom labels to all metrics exposed through the prometheus exporter. You may have multiple of these fields + AddLabels map[string]string `json:"addLabels,omitempty"` +} + +// implement Section() method +func (_ *PrometheusExporter) Name() string { + return "prometheus_exporter" +} + +// implement Section() method +func (p *PrometheusExporter) Params(sl plugins.SecretLoader) (*params.KVs, error) { + kvs := params.NewKVs() + if p.Host != "" { + kvs.Insert("host", p.Host) + } + if p.Port != nil { + kvs.Insert("port", fmt.Sprint(*p.Port)) + } + kvs.InsertStringMap(p.AddLabels, func(k, v string) (string, string) { + return "add_label", fmt.Sprintf(" %s %s", k, v) + }) + return kvs, nil +} diff --git a/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go b/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go index 574f4bf02..821851ccc 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go +++ b/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go @@ -708,6 +708,33 @@ func (in *OpenTelemetry) DeepCopy() *OpenTelemetry { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PrometheusExporter) DeepCopyInto(out *PrometheusExporter) { + *out = *in + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(int32) + **out = **in + } + if in.AddLabels != nil { + in, out := &in.AddLabels, &out.AddLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusExporter. +func (in *PrometheusExporter) DeepCopy() *PrometheusExporter { + if in == nil { + return nil + } + out := new(PrometheusExporter) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrometheusRemoteWrite) DeepCopyInto(out *PrometheusRemoteWrite) { *out = *in diff --git a/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go b/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go index 4ba987718..aed2197f9 100644 --- a/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go +++ b/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go @@ -1328,6 +1328,11 @@ func (in *OutputSpec) DeepCopyInto(out *OutputSpec) { *out = new(output.OpenTelemetry) (*in).DeepCopyInto(*out) } + if in.PrometheusExporter != nil { + in, out := &in.PrometheusExporter, &out.PrometheusExporter + *out = new(output.PrometheusExporter) + (*in).DeepCopyInto(*out) + } if in.PrometheusRemoteWrite != nil { in, out := &in.PrometheusRemoteWrite, &out.PrometheusRemoteWrite *out = new(output.PrometheusRemoteWrite) @@ -1501,6 +1506,11 @@ func (in *Service) DeepCopyInto(out *Service) { *out = new(bool) **out = **in } + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(Storage) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service. @@ -1512,3 +1522,23 @@ func (in *Service) DeepCopy() *Service { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Storage) DeepCopyInto(out *Storage) { + *out = *in + if in.MaxChunksUp != nil { + in, out := &in.MaxChunksUp, &out.MaxChunksUp + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. +func (in *Storage) DeepCopy() *Storage { + if in == nil { + return nil + } + out := new(Storage) + in.DeepCopyInto(out) + return out +} diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml index d0e9acc37..523aae3ff 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml @@ -2038,6 +2038,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml index e460042bb..3c74d368a 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml @@ -2038,6 +2038,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. diff --git a/charts/fluent-operator/templates/fluentbit-clusterinput-metrics.yaml b/charts/fluent-operator/templates/fluentbit-clusterinput-metrics.yaml new file mode 100644 index 000000000..26711b250 --- /dev/null +++ b/charts/fluent-operator/templates/fluentbit-clusterinput-metrics.yaml @@ -0,0 +1,14 @@ +{{- if .Values.fluentbit.enable -}} +{{- if .Values.fluentbit.input.fluentBitMetrics -}} +apiVersion: fluentbit.fluent.io/v1alpha2 +kind: ClusterInput +metadata: + name: fluentbit-metrics + labels: + fluentbit.fluent.io/enabled: "true" + fluentbit.fluent.io/component: logging +spec: + fluentBitMetrics: +{{ toYaml .Values.fluentbit.input.fluentBitMetrics | indent 4}} +{{- end }} +{{- end }} diff --git a/charts/fluent-operator/templates/fluentbit-output-prometheus-exporter.yaml b/charts/fluent-operator/templates/fluentbit-output-prometheus-exporter.yaml new file mode 100644 index 000000000..9869201e9 --- /dev/null +++ b/charts/fluent-operator/templates/fluentbit-output-prometheus-exporter.yaml @@ -0,0 +1,15 @@ +{{- if .Values.fluentbit.enable -}} +{{- if .Values.fluentbit.output.prometheusMetricsExporter -}} +apiVersion: fluentbit.fluent.io/v1alpha2 +kind: ClusterOutput +metadata: + name: prometheus-exporter + labels: + fluentbit.fluent.io/enabled: "true" + fluentbit.fluent.io/component: logging +spec: + match: {{ .Values.fluentbit.output.prometheusMetricsExporter.match }} + prometheusExporter: +{{ toYaml .Values.fluentbit.output.prometheusMetricsExporter.metricsExporter | indent 4}} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 93244719e..ac9808bb4 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -191,6 +191,12 @@ fluentbit: # path: # procfs: /host/proc # sysfs: /host/sys + fluentBitMetrics: {} + # uncomment below fluentBitMetrics section if you want to collect fluentBit metrics +# fluentBitMetrics: +# scrapeInterval: "2" +# scrapeOnStart: true +# tag: "fb.metrics" # Configure the output plugin parameter in FluentBit. # You can set enable to true to output logs to the specified location. @@ -228,6 +234,15 @@ fluentbit: # You can configure the opensearch-related configuration here stdout: enable: false + # Uncomment the following section to enable Prometheus metrics exporter. + prometheusMetricsExporter: {} +# prometheusMetricsExporter: +# match: "fb.metrics" +# metricsExporter: +# host: "0.0.0.0" +# port: 2020 +# addLabels: +# app: "fluentbit" service: storage: {} # Remove the above storage section and uncomment below section if you want to configure file-system as storage for buffer diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index d0e9acc37..523aae3ff 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -2038,6 +2038,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index e460042bb..3c74d368a 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -2038,6 +2038,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. diff --git a/go.mod b/go.mod index d1ce8e4bb..c7c35c777 100644 --- a/go.mod +++ b/go.mod @@ -58,12 +58,14 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect + golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.9.1 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -72,7 +74,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/code-generator v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect + k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 641313c9a..eedf76a5f 100644 --- a/go.sum +++ b/go.sum @@ -89,6 +89,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -349,6 +350,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -503,6 +506,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -513,6 +517,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -640,8 +645,13 @@ k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= +k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= +k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= @@ -657,5 +667,6 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index 552aae100..cfa37b0ae 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -4133,6 +4133,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. @@ -24766,6 +24791,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index 4a2575e6a..77c26ac5e 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -4133,6 +4133,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. @@ -24766,6 +24791,31 @@ spec: server listening for traces, e.g: /v1/traces' type: string type: object + prometheusExporter: + description: PrometheusExporter_types defines Prometheus exporter + configuration to expose metrics from Fluent Bit. + properties: + addLabels: + additionalProperties: + type: string + description: This allows you to add custom labels to all metrics + exposed through the prometheus exporter. You may have multiple + of these fields + type: object + host: + description: 'IP address or hostname of the target HTTP Server, + default: 0.0.0.0' + type: string + port: + description: This is the port Fluent Bit will bind to when hosting + prometheus metrics. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + required: + - host + type: object prometheusRemoteWrite: description: PrometheusRemoteWrite_types defines Prometheus Remote Write configuration.