Skip to content

Need to have a separate log file for all docker events logs #29548

@milindchawre

Description

@milindchawre

Description

Docker provides a way to capture all the events logs using "docker events" command.
But docker currently, don't save these events logs in any file.
Docker should store all these events log in a separate file, so that as a user I can analyse all the events taking place in my containerized plaform.
Since docker don't provide this, I need to write a separate systemd service that depends on docker service and it redirects the "docker events" logs to a separate file.

Describe the results you received:
"docker events" don't logs in any file.

Describe the results you expected:
"docker events" should store all the events logs in a separate file.

Output of docker version:

Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 97
Server Version: 1.12.1
Storage Driver: devicemapper
 Pool Name: docker-253:1-650320-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 5.223 GB
 Data Space Total: 107.4 GB
 Data Space Available: 44.74 GB
 Metadata Space Used: 6.988 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.14 GB
 Thin Pool Minimum Free Space: 10.74 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.107-RHEL7 (2016-06-09)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null overlay host bridge
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 3.10.0-327.13.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.954 GiB
Name: dockerhost.cisco.com
ID: BLND:CG2Q:6TZJ:KBUU:LPON:F6CG:LZBO:OVKT:P67J:YHQO:XD7M:HE77
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
 127.0.0.0/8

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/loggingkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyversion/1.12

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions