syslog-ng

by Wiremind

Helm chartv0.1.0App 4.8.3Verified publisher

A Helm chart for syslog-ng, an enhanced log daemon that supports a wide range of input and output methods

About this chart

syslog-ng

syslog-ng is an enhanced log daemon that supports a wide range of input and output methods, including syslog, message queues, and databases, for flexible log management and forwarding.

Introduction

This chart deploys syslog-ng to your Kubernetes cluster via a Deployment and Service using the linuxserver/syslog-ng Docker image.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+

Installing the Chart

To install the chart with the release name my-release, run:

$ helm repo add wiremind https://wiremind.github.io/wiremind-helm-charts
$ helm install my-release wiremind/syslog-ng

After a few seconds, syslog-ng should be running and ready to receive logs.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm uninstall my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the syslog-ng chart and their default values.

Image Configuration

ParameterDescriptionDefault
image.repositoryImage repositorylscr.io/linuxserver/syslog-ng
image.tagImage tag"" (uses Chart appVersion: 4.8.3)
image.pullPolicyImage pull policyIfNotPresent

Environment Variables

ParameterDescriptionDefault
envEnvironment variables mapSee values.yaml
env.TZTimezoneEtc/UTC
env.LOG_TO_STDOUTLog to stdout instead of /config/log/"true" (enabled)
extraEnvAdditional environment variables{}
extraSecretEnvAdditional environment variables from secrets{}

Service Configuration

ParameterDescriptionDefault
service.typeKubernetes service typeClusterIP
service.portsList of service portsSee values.yaml
service.ports[].namePort namesyslog-udp, syslog-tcp
service.ports[].portExternal port514 (both UDP and TCP)
service.ports[].targetPortInternal container port5514
service.ports[].protocolProtocolUDP, TCP

Configuration

ParameterDescriptionDefault
config.enabledCreate ConfigMap with syslog-ng.conftrue
config.syslogNgConfsyslog-ng.conf contentSee values.yaml
config.existingConfigMapUse existing ConfigMap""

Container Command and Args

ParameterDescriptionDefault
commandContainer command override[] (uses image default)
argsContainer args override[] (uses image default)

Resources

ParameterDescriptionDefault
resourcesCPU/Memory resource requests and limitsSee values.yaml
resources.limits.cpuCPU limit500m
resources.limits.memoryMemory limit512Mi
resources.requests.cpuCPU request100m
resources.requests.memoryMemory request128Mi

Probes

ParameterDescriptionDefault
livenessProbe.enabledEnable liveness probefalse
readinessProbe.enabledEnable readiness probefalse

Pod Scheduling

ParameterDescriptionDefault
priorityClassNamePriority class name for pod scheduling""
runtimeClassNameRuntime class name for pod execution""
nodeSelectorNode selector for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity rules for pod assignment{}
topologySpreadConstraintsTopology spread constraints[]

Pod Disruption Budget

ParameterDescriptionDefault
podDisruptionBudget.enabledEnable PodDisruptionBudgetfalse
podDisruptionBudget.minAvailableMinimum available pods during disruption""
podDisruptionBudget.maxUnavailableMaximum unavailable pods during disruption""

Usage Examples

Basic Installation

helm install syslog-ng wiremind/syslog-ng

Custom Configuration

Create a custom values.yaml:

config:
  syslogNgConf: |
    @version: 4.8
    @include "scl.conf"

    # Sources
    source s_net {
        network(
            ip(0.0.0.0)
            port(5514)
            transport("udp")
        );
        network(
            ip(0.0.0.0)
            port(5514)
            transport("tcp")
        );
    };

    # Destinations
    destination d_messages {
        stdout();
    };

    # Log paths - connect sources to destinations
    log {
        source(s_net);
        destination(d_messages);
    };

Then install:

helm install syslog-ng wiremind/syslog-ng -f values.yaml

Using NodePort Service

service:
  type: NodePort

Custom Service Ports

Add or modify service ports:

service:
  ports:
    - name: syslog-udp
      port: 514
      targetPort: 5514
      protocol: UDP
    - name: syslog-tcp
      port: 514
      targetPort: 5514
      protocol: TCP
    - name: custom-port
      port: 9000
      targetPort: 9000
      protocol: TCP

Using Topology Spread Constraints

topologySpreadConstraints:
  - maxSkew: 1
    topologyKey: topology.kubernetes.io/zone
    whenUnsatisfiable: ScheduleAnyway
    labelSelector:
      matchLabels:
        app.kubernetes.io/name: syslog-ng
        app.kubernetes.io/instance: RELEASE-NAME

Using Affinity Rules

affinity:
  podAntiAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        podAffinityTerm:
          labelSelector:
            matchExpressions:
              - key: app.kubernetes.io/name
                operator: In
                values:
                  - syslog-ng
          topologyKey: kubernetes.io/hostname

Using Existing ConfigMap

If you have an existing ConfigMap with syslog-ng.conf:

config:
  enabled: false
  existingConfigMap: "my-syslog-ng-config"

Custom Container Command and Args

Override the container command or arguments:

command:
  - /custom/command

args:
  - --custom-arg
  - value

Using PodDisruptionBudget

Enable PodDisruptionBudget to ensure availability during disruptions:

podDisruptionBudget:
  enabled: true
  minAvailable: 1  # Or use maxUnavailable instead

Or:

podDisruptionBudget:
  enabled: true
  maxUnavailable: 1

Ports and Protocols

The chart exposes ports configured in service.ports. By default:

  • UDP 514: Standard syslog protocol (mapped to container port 5514)
  • TCP 514: Reliable syslog over TCP (mapped to container port 5514)

You can add or modify ports by updating the service.ports list in values.yaml.

Configuration File

The syslog-ng configuration file is mounted at /config/syslog-ng.conf inside the container. You can customize it by:

  1. Providing custom configuration in values.yaml under config.syslogNgConf
  2. Using an existing ConfigMap via config.existingConfigMap

The default configuration:

  • Uses syslog-ng 4.8 format (@version: 4.8)
  • Listens on UDP and TCP protocols on port 5514
  • Outputs logs to stdout using stdout() driver
  • Includes a log statement connecting sources to destinations

The /config directory uses ephemeral storage (emptyDir) by default. The /run directory is mounted as tmpfs (1Gi limit) for s6-overlay compatibility.

Security Context

The chart includes security context settings for running securely:

  • readOnlyRootFilesystem: true by default
  • Capabilities: SETGID, SETUID, CHOWN are added, all others dropped
  • allowPrivilegeEscalation: false
  • Seccomp profile: RuntimeDefault

You can customize security context settings via podSecurityContext and securityContext in values.yaml.

Health Checks

The chart includes configurable liveness and readiness probes that use syslog-ng-ctl stats to verify the service is running and ready. Probes are disabled by default (enabled: false) but can be enabled via livenessProbe.enabled and readinessProbe.enabled in values.yaml.

Troubleshooting

Check Pod Status

kubectl get pods -l app.kubernetes.io/name=syslog-ng

View Logs

kubectl logs -l app.kubernetes.io/name=syslog-ng

Test syslog-ng Configuration

kubectl exec -it <pod-name> -- syslog-ng-ctl config-test

Reload Configuration

kubectl exec -it <pod-name> -- syslog-ng-ctl reload

Check PodDisruptionBudget Status

kubectl get pdb -n <namespace> -l app.kubernetes.io/name=syslog-ng

References

Deploy syslog-ng with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has syslog-ng on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartsyslog-ng is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply