syslog-ng is supported only in Logging operator 4.0 or newer.

You can configure the deployment of the syslog-ng log forwarder via the syslogNG section of the The Logging custom resource. For the detailed list of available parameters, see SyslogNGSpec.

The following example sets a volume mount that syslog-ng can use for buffering messages on the disk (if Disk buffer is configured in the output).

apiVersion: logging.banzaicloud.io/v1beta1
kind: Logging
  name: test
spec:
  syslogNG:
    statefulSet:
      spec:
        template:
          spec:
            containers:
            - name: syslog-ng
              volumeMounts:
              - mountPath: /buffers
                name: buffer
        volumeClaimTemplates:
        - metadata:
            name: buffer
          spec:
            accessModes:
            - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi

CPU and memory requirements 🔗︎

To adjust the CPU and memory limits and requests of the pods managed by Logging operator, see CPU and memory requirements.

Probe 🔗︎

A Probe is a diagnostic performed periodically by the kubelet on a Container. To perform a diagnostic, the kubelet calls a Handler implemented by the Container. You can configure a probe for syslog-ng in the livenessProbe section of the The Logging custom resource. For example:

apiVersion: logging.banzaicloud.io/v1beta1
kind: Logging
metadata:
  name: default-logging-simple
spec:
  syslogNG:
    livenessProbe:
      periodSeconds: 60
      initialDelaySeconds: 600
      exec:
        command:
        - "/usr/sbin/syslog-ng-ctl"
        - "--control=/tmp/syslog-ng/syslog-ng.ctl"
        - "query"
        - "get"
        - "global.sdata_updates.processed"
  controlNamespace: logging

You can use the following parameters:

Name Type Default Description
initialDelaySeconds int 30 Number of seconds after the container has started before liveness probes are initiated.
timeoutSeconds int 0 Number of seconds after which the probe times out.
periodSeconds int 10 How often (in seconds) to perform the probe.
successThreshold int 0 Minimum consecutive successes for the probe to be considered successful after having failed.
failureThreshold int 3 Minimum consecutive failures for the probe to be considered failed after having succeeded.
exec array {} Exec specifies the action to take. More info

Note: To configure readiness probes, see Readiness probe.