fluent / fluent/fluent-operator

help request: Fluentd Prometheus Plugin and Metrics Expose

Open
#1,777 1 comment 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
682
Forks
328
Avg merge
2d 23h
Merged PRs (30d)
13

Description

### Describe the issue

Dear Community,

I would like my Fluentd pods to provide metrics about themselves on 24231 port /metrics patch.

It's not entirely clear to me, but I wanted this block

```ruby

@type prometheus
bind 0.0.0.0
port 24231
metrics_path /metrics

```
to be included in my fluentd config and the metrics to be placed in the /metrics path.

To do this, I also created a ClusterInput:

```yaml
apiVersion: fluentd.fluent.io/v1alpha1
kind: ClusterInput
metadata:
labels:
config.fluentd.fluent.io/enabled: 'true'
name: prometheus-metrics
spec:
inputs:
- customPlugin:
config: |

@type prometheus
bind 0.0.0.0
port 24231
metrics_path /metrics

```

And I patched: ClusterFluentdConfig with this because by default the template does not contain it:

clusterInputSelector:
matchLabels:
filter.fluentd.fluent.io/enabled: "true"

```yaml
apiVersion: fluentd.fluent.io/v1alpha1
kind: ClusterFluentdConfig
metadata:
labels:
config.fluentd.fluent.io/enabled: "true"
name: fluentd-config
spec:
clusterFilterSelector:
matchLabels:
filter.fluentd.fluent.io/enabled: "true"
clusterInputSelector:
matchLabels:
filter.fluentd.fluent.io/enabled: "true"
clusterOutputSelector:
matchLabels:
output.fluentd.fluent.io/enabled: "true"
watchedNamespaces: []

```

I still find that the Prometheus-specific Source is not included in the configuration (fluentd-config k8s secret).

Do you have any tips on what else might be missing? Thank you in advance for your help.

### How did you install fluent operator?

With Helm Chart ( version 3.3.0).

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with Helm chart version 3.3.0 using the ClusterInput and ClusterFluentdConfig manifests from the report. Compare those resources with the generated fluentd-config Secret and trace how the clusterInputSelector is handled. Done means identifying why the Prometheus source is omitted and documenting or correcting the confirmed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.