Fluentd Logging


The Service Proxy for Kubernetes (SPK) Fluentd Pod is an open source data collector that can be configured to receive logging data from the Ingress Controller, Service Proxy Traffic Management Microkernel (TMM), and Distributed Session State Managment (dSSM) Pods. To create log file directories for each of the SPK Pods, Fluentd must bind to a Kubernetes persistence volume.

This document guides you through understanding, configuring and deploying the f5-fluentd logging container.

Fluentd Service

When 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.

Example Fluentd Service:

Name:              f5-toda-fluentd
Namespace:         spk-utilities
Port:              <unset>  54321/TCP

Example Fluentd integration:


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


Prior to installing Fluentd, ensure you have:



Use the following steps to the install the f5-fluentd container.

  1. Change into local directory with the SPK files, and list the files in the tar directory:

    cd <directory>
    ls -1 tar

    In this example, the SPK files are in the spkinstall directory:

    cd spkinstall
    ls -1 tar

    In this example, Fluentd Helm chart is named f5-toda-fluentd-1.7.7.tgz:

  2. Create a new Project for the f5-fluentd container:

    _images/spk_info.png Note: This Project can also be used by the dSSM Database Pods in the next integration stage.

    oc new-project <project>

    In this example, a new Project named spk-utilities is created:

    oc new-project spk-utilities
  3. Create a Helm values file named fluentd-values.yaml, and set the image.repository and the persistence.storageClass parameters:

      repository: <registry>
      enabled: true
      storageClass: "<name>"

    In this example, Helm pulls the f5-fluentd image from registry.com, and the container will bind to the storageClass named managed-nfs-storage:

      repository: registry.com
      enabled: true
      storageClass: "managed-nfs-storage"
  4. Optional: Add the following parameters to the values file to collect logging data from the Ingress Controller and dSSM Pods:

    # Collect logging from the Ingress Controller Pod
      enabled: true
      stdout: true
    # Collect logging from the dSSM Pods
      enabled: true
      stdout: true
    # Configuration for sentinel logs
      enabled: true
      stdout: true
  5. Install the f5-fluentd container and save the Fluentd hostname for the Ingress Controller installation:

    helm install f5-fluentd tar/f5-toda-fluentd-1.7.7.tgz -f fluentd-values.yaml

    _images/spk_info.png Note: In this example, the Fluentd hostname is f5-toda-fluentd.spk-utilities.svc.cluster.local.:

    FluentD hostname: f5-toda-fluentd.spk-utilities.svc.cluster.local.
    FluentD port: "54321"
  6. The f5-fluentd container should now be successfully installed:

    oc get pods

    In this example, the Fluentd Pod STATUS is Running:

    NAME                              READY   STATUS    
    f5-toda-fluentd-8cf96967b-jxckr   1/1     Running  
  7. Fluentd should also be bound to the persistent volume:

    oc get pvc

    In this example, the Fluentd Pod PVC displays STATUS as Bound:

    NAME              STATUS   VOLUME                                     STORAGECLASS
    f5-toda-fluentd   Bound    pvc-7d36b530-b718-466c-9b6e-895e8f1079a2   managed-nfs-storage

Viewing logs

After installing the Ingress Controller and dSSM Pods, you can use the following steps to view the logs in the f5-fluentd container:

  1. Log in to the fluentd container:

    oc exec -it deploy/f5-toda-fluentd -n <project> -- bash

    In this example, the container is in the spk-utilities Project:

    oc exec -it deploy/f5-toda-fluentd -n spk-utilities -- bash
  2. 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  
  3. Change into one of the subdirectories, for example f5-dssm-db-0:

    cd f5-dssm-db-0
  4. View the logs using the more command:

    more -d dssm.log

Next step

Continue to one of the following steps listed by installation precedence:


Provide feedback to improve this document by emailing spkdocs@f5.com.