I'm using Rancher to manage my Kubernetes cluster and have added a logging system (cattle-logging-system
) via Fleet. I now need to add monitoring for Fluentd using the fluent-plugin-prometheus
.
Here's the main configuration I used for deploying the logging system:
# fleet.yaml
- name: dev
helm:
valuesFiles:
- ./values/dev.yaml
clusterGroup: logging
clusterSelector:
matchLabels:
env: dev
# ./values/dev.yaml
fluentbit:
tolerations:
- key: node-role.kubernetes.io/controlplane
value: "true"
effect: NoSchedule
...
fluentd:
resources:
...
My current values
file doesn't have settings for fluent-plugin-prometheus
. How can I add them and update my Fluentd deployment via Fleet to start collecting Prometheus metrics?
Also, I'm curious about how to update the current configuration without losing existing settings since Fluentd is already collecting logs for specific labels and containers.
I've tried updating my values file with the following configuration to include fluent-plugin-prometheus
settings:
fluentd:
resources:
limits:
cpu: 2000m
memory: 2048Mi
requests:
cpu: 500m
memory: 768Mi
config:
source: |
@type prometheus
bind 0.0.0.0
port 24231
sourceMonitor: |
@type prometheus_monitor
<labels>
host ${hostname}
</labels>
However, this didn't change the situation, and the updates were not reflected in the secret containing the fluentd.conf
configuration file. I'm not sure why these changes are not being applied. Any ideas or suggestions on how to properly incorporate these settings?