Fluentd Logging¶
The BIG-IP Next for Kubernetes Fluentd logging Pod is an open source data collector that can be configured to receive logging data from the BIG-IP Next for Kubernetes, Traffic Management Microkernel (TMM), and Distributed Session State Management (dSSM) Pods. To create log file directories for each of the BIG-IP Next for Kubernetes Pods, Fluentd must bind to a Kubernetes Persistent Volumes.
Fluentd Service¶
After installing Fluentd, a Service object is created to receive logging data on TCP service port 54321, and forward the data to Fluentd on TCP service port 24224. Ensure the Service port is available, and the cluster has CoreDNS enabled. In this example, the BIG-IP Next for Kubernetes components will need to resolve the f5-toda-fluentd.f5-utils hostname:
Example Fluentd Service:
Name: f5-toda-fluentd
Namespace: f5-utils
IP: 10.109.102.215
Port: <unset> 54321/TCP
Endpoints: 10.244.1.75:24224
Log file locations¶
Fluentd collects logging data in the following log files:
Container | Log file |
---|---|
f5-dssm-sentinel | /var/log/f5/f5-dssm-sentinel-0/sentinel.log |
f5-dssm-db | /var/log/f5/f5-dssm-db-0/dssm.log |
f5ingress | /var/log/f5/helm_release-f5ingress/pod_name/f5ingress.log |
f5-tmm | /var/log/f5/f5-tmm/pod_name/f5-fsm-tmm.log |
f5-tmm-routing | /var/log/f5/f5-tmm/pod_name/f5-tmm-routing.log |
Note: To modify the TMM logging level, review the bdt_cli section of the Debug Sidecar overview.
Viewing logs¶
After installing the BIG-IP Next for Kuberneters with the Controller and dSSM Pods, you can use the following steps to view the logs in the f5-fluentd
container:
Log in to the fluentd container:
kubectl exec -it deploy/f5-toda-fluentd -n <project> -- sh
In this example, the container is in the f5-utils Project:
kubectl exec -it deploy/f5-toda-fluentd -n f5-utils -- sh
Change to the main logging directory, and list the subdirectories:
cd /var/log/f5; ls
In this example, logging directories are present for the f5ingress, f5-tmm, f5-dssm-db, and f5-dssm-sentinel Pods:
f5-dssm-db-0 f5-dssm-db-1 f5-dssm-db-2 f5-dssm-sentinel-0 f5-dssm-sentinel-1 f5-dssm-sentinel-2 f5-ingress-f5ingress f5-tmm
Change into one of the subdirectories, for example f5-dssm-db-0:
cd f5-dssm-db-0
View the logs using the more command:
more -d dssm.log
Kafka Plugin Deployment¶
Kafka plugin deployment in Fluentd Pod. Kafka plugin is disabled by default.
# Configuration of the output kafka plugin to deliver tmmstats to the kafka deployment
kafkaPlugin:
enabled: false
# DNS name of the service for the kafka deployment
serviceName: kafka
# TCP port of the service for the kafka deployment
servicePort: 5656
# Kafka Topic for tmmstats
topic: tmmstats