Docker Community Forums

Share and learn in the Docker community.

Docker: Error response from daemon: unknown log opt "gelf-tag" for gelf log driver

(alexus) #1

I’m trying to follow Route Docker Logs to ELK Stack and while trying to run:

docker run -d --net=host --log-driver=gelf --log-opt gelf-address=udp://$LOGSTASH_ADDRESS:12201 --log-opt gelf-tag=“fe” nginx

I’m getting following error:

docker: Error response from daemon: unknown log opt “gelf-tag” for gelf log driver.

My environment:

$ uname -a
Darwin mbp 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64
$ docker info
Containers: 7
Running: 6
Paused: 0
Stopped: 1
Images: 7
Server Version: 1.12.3
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 49
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.30-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.951 GiB
Name: moby
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 47
Goroutines: 72
System Time: 2016-11-16T04:18:32.504713303Z
EventsListeners: 2
No Proxy: *.local, 169.254/16
Username: alexus
Experimental: true
Insecure Registries:

Please advice

(Reflectiondm) #2

Please see GELF documentation
You should use just ‘tag’ instead of ‘tag’
docker run -d --net=host --log-driver=gelf --log-opt gelf-address=udp://$LOGSTASH_ADDRESS:12201 --log-opt tag="fe" nginx

(alexus) #3

I’m guessing you meant to say use tag instead of gelf-tag )