monitoringartist / dockbix-agent-xxl

:whale: Dockerized Zabbix agent with Docker metrics and host metrics support for CoreOS, RHEL, CentOS, Ubuntu, Debian, Fedora, Boot2docker, Photon OS, Amazon Linux, ...
https://hub.docker.com/r/monitoringartist/dockbix-agent-xxl-limited/
Other
182 stars 54 forks source link

Cannot open metric file: '/sys/fs/cgroup/memory/.../memory.stat' #22

Closed sizerus closed 7 years ago

sizerus commented 7 years ago

My system is RHEL 7.3, docker version 1.12.5, build 047e51b/1.12.5, docker-compose version 1.10.0, build 4bd6f1a. Selinux & user namespace's are enabled.

docker-compose.yml:
version: '2.1'
services:
    zocker:
        container_name: zocker
        image: monitoringartist/zabbix-agent-xxl-limited
        ports:
            - "10060:10050"
        hostname: $HOSTNAME 
        volumes: 
            - /:/rootfs:ro,z
            - /var/run:/var/run:ro,z
        environment:
            - ZA_Server=10.0.0.1
        userns_mode: host
        privileged: true

In logs:

13:20170220:133750.978 Cannot open metric file: '/sys/fs/cgroup/memory/d85758f142afcc4887f3bc2dcbae682e9b60cc63e487d530e225835e953d5747/memory.stat'
11:20170220:133751.981 Cannot open metric file: '/sys/fs/cgroup/memory/174aaa981703620fec6c8695289b6623390d1c04cd28a369bc1f1479106f2131/memory.stat'

Actually this 2 files are here:

/sys/fs/cgroup/memory/system.slice/docker-d85758f142afcc4887f3bc2dcbae682e9b60cc63e487d530e225835e953d5747.scope/memory.stat
/sys/fs/cgroup/memory/system.slice/docker-174aaa981703620fec6c8695289b6623390d1c04cd28a369bc1f1479106f2131.scope/memory.stat

Can you suggest some solutions?

jangaraj commented 7 years ago

Can I see your docker info please?

How did you configure user namespaces?

user namespace's are enabled.

Try to create container directly (no docker-compose):

docker pull monitoringartist/zabbix-agent-xxl-limited:latest
docker run \
  --name=zabbix-agent-xxl \
  -h $(hostname) \
  -p 10050:10050 \
  -v /:/rootfs \
  -v /var/run:/var/run \
  -e "ZA_Server=<ZABBIX SERVER IP/DNS NAME>" \
  -d monitoringartist/zabbix-agent-xxl-limited:latest
sizerus commented 7 years ago

> Can I see your docker info please? [root@balancer zocker]# docker info Containers: 2 Running: 2 Paused: 0 Stopped: 0 Images: 5 Server Version: 1.12.5 Storage Driver: devicemapper Pool Name: vg_dockerstgpool-dockerstgpool01 Pool Blocksize: 131.1 kB Base Device Size: 10.74 GB Backing Filesystem: xfs Data file: Metadata file: Data Space Used: 2.331 GB Data Space Total: 53.58 GB Data Space Available: 51.25 GB Metadata Space Used: 2.499 MB Metadata Space Total: 50.33 MB Metadata Space Available: 47.83 MB Thin Pool Minimum Free Space: 5.358 GB Udev Sync Supported: true Deferred Removal Enabled: false Deferred Deletion Enabled: false Deferred Deleted Device Count: 0 Library Version: 1.02.135-RHEL7 (2016-09-28) Logging Driver: journald Cgroup Driver: systemd Plugins: Volume: local Network: bridge overlay null host Authorization: rhel-push-plugin Swarm: inactive Runtimes: docker-runc runc Default Runtime: docker-runc Security Options: seccomp selinux Kernel Version: 3.10.0-514.2.2.el7.x86_64 Operating System: Red Hat Enterprise Linux OSType: linux Architecture: x86_64 Number of Docker Hooks: 2 CPUs: 2 Total Memory: 3.702 GiB Name: balancer.unix.local ID: FXIM:Y2GY:BC3T:Z7DN:AT57:EY56:LYVS:IDMC:G2WC:JNWI:TQMG:HTY5 Docker Root Dir: /var/lib/docker/165536.165536 Debug Mode (client): false Debug Mode (server): false Registry: https://adm.local:5000/v1/ Insecure Registries: 127.0.0.0/8 Registries: https://adm.local:5000 (secure), docker.io (secure)

> How did you configure user namespaces? grubby --args="user_namespace.enable=1" --update-kernel="$(grubby --default-kernel)" reboot [root@balancer zocker]# cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-514.2.2.el7.x86_64 root=/dev/mapper/vg_system-lv_root ro nofb splash=quiet crashkernel=auto rd.lvm.lv=vg_system/lv_root rd.lvm.lv=vg_system/lv_swap rhgb quiet user_namespace.enable=1 LANG=en_US.UTF-8

> Try to create container directly (no docker-compose): [root@balancer zocker]# docker run --name=zabbix-agent-xxl -h $(hostname) -p 10060:10050 -v /:/rootfs -v /var/run:/var/run -e "ZA_Server=10.0.0.1" -d monitoringartist/zabbix-agent-xxl-limited:latest && docker logs -f zabbix-agent-xxl 9d1436e6bc476c5313be56b0d94b11361ef6e83029e9cb1fd84b729ea4104d6a Zocker XXL v0.9.4b public limited version Copyright (C) 2014-2016 Jan Garaj - www.monitoringartist.com Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only. Starting Zabbix Agent [balancer.unix.local]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). Press Ctrl+C to exit. 9:20170220:171038.508 Starting Zabbix Agent [balancer.unix.local]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). 9:20170220:171038.509 Enabled features 9:20170220:171038.509 IPv6 support: YES 9:20170220:171038.509 TLS support: YES 9:20170220:171038.509 ** 9:20170220:171038.509 using configuration file: /etc/zabbix/zabbix_agentd.conf 9:20170220:171038.513 Cannot connect to standard docker's socket /var/run/docker.sock 9:20170220:171038.514 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so 9:20170220:171038.515 agent #0 started [main process] 10:20170220:171038.515 agent #1 started [collector] 11:20170220:171038.516 agent #2 started [listener #1] 12:20170220:171038.518 agent #3 started [listener #2] 13:20170220:171038.519 agent #4 started [listener #3] panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x40596a] goroutine 1 [running]: panic(0x7eb920, 0xc82000a070) /usr/local/go/src/runtime/panic.go:481 +0x3e6 main.main() /root/git/zabbix-agent-xxl-source-code-private/zabbix-agent-3.0-limited/zocker-xxl.go:191 +0x496a

sizerus commented 7 years ago

sorry if run with --privileged --userns=host: [root@balancer zocker]# docker run --name=zabbix-agent-xxl -h $(hostname) -p 10060:10050 -v /:/rootfs:z -v /var/run:/var/run:z -e "ZA_Server=10.0.0.1" --privileged --userns=host -d monitoringartist/zabbix-agent-xxl-limited:latest && docker logs -f zabbix-agent-xxl d829087b0896a802c9b39d50c438f46f4fa3dfefef3fcd2e59d389b67a30cf7d Zocker XXL v0.9.4b public limited version Copyright (C) 2014-2016 Jan Garaj - www.monitoringartist.com Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only. Starting Zabbix Agent [balancer.unix.local]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). Press Ctrl+C to exit. 9:20170220:173317.097 Starting Zabbix Agent [balancer.unix.local]. Zabbix 3.0.4 XXL (2016-08-21) (revision 61185). 9:20170220:173317.098 Enabled features 9:20170220:173317.098 IPv6 support: YES 9:20170220:173317.098 TLS support: YES 9:20170220:173317.098 ** 9:20170220:173317.098 using configuration file: /etc/zabbix/zabbix_agentd.conf 9:20170220:173317.107 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so 9:20170220:173317.108 agent #0 started [main process] 10:20170220:173317.109 agent #1 started [collector] 11:20170220:173317.109 agent #2 started [listener #1] 12:20170220:173317.111 agent #3 started [listener #2] 13:20170220:173317.112 agent #4 started [listener #3] 11:20170220:173320.557 Cannot open metric file: '/sys/fs/cgroup/memory/174aaa981703620fec6c8695289b6623390d1c04cd28a369bc1f1479106f2131/memory.stat' 11:20170220:173320.568 Cannot find the [Id] item in the received JSON object 11:20170220:173320.568 Cannot open metric file: '/sys/fs/cgroup/memory//zocker/memory.stat' 11:20170220:173320.570 Cannot open metric file: '/sys/fs/cgroup/memory/174aaa981703620fec6c8695289b6623390d1c04cd28a369bc1f1479106f2131/memory.stat' ^C

jangaraj commented 7 years ago

Please try this image with debuglevel=5:

docker run \
  --name=dockbix-agent-xxl \
  --net=host \
  --privileged \
  --userns=host \
  -v /:/rootfs \
  -v /var/run:/var/run \
  -e "ZA_Server=<ZABBIX SERVER IP/DNS NAME>" \
  -e "ZA_DebugLevel=5 \
  -d monitoringartist/dockbix-agent-xxl-limited:latest
docker logs -f dockbix-agent-xxl
jangaraj commented 7 years ago

Any update?

jangaraj commented 7 years ago

Closing, no user response.

sizerus commented 7 years ago

jangaraj, sorry for long reply runningwith --net=host:

[root@balancer.unix.local ~]# docker run --name=dockbix-agent-xxl -p 10060:10050 --net=host --privileged --userns=host -v /:/rootfs:z -v /var/run:/var/run:z -e "ZA_Server=10.0.0.1" -e "ZA_DebugLevel=5" -d monitoringartist/dockbix-agent-xxl-limited:latest && docker logs -f dockbix-agent-xxl
2f794df8c6fbd940bde0fce61cb071481361511afeeec3045f1ab64cb5ad7e42
Dockbix Agent XXL v0.0.1b limited version
Copyright (C) 2014-2017 Jan Garaj - www.monitoringartist.com
Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only.
Starting Zabbix Agent [balancer.unix.local]. Zabbix 3.2.3 Dockbix XXL (2017-02-17) (revision 64610).
Press Ctrl+C to exit.
    11:20170302:102008.298 Starting Zabbix Agent [balancer.unix.local]. Zabbix 3.2.3 Dockbix XXL (2017-02-17) (revision 64610).
    11:20170302:102008.299 **** Enabled features ****
    11:20170302:102008.299 IPv6 support:          YES
    11:20170302:102008.299 TLS support:            NO
    11:20170302:102008.299 **************************
    11:20170302:102008.299 using configuration file: /etc/zabbix/zabbix_agentd.conf
    11:20170302:102008.299 In zbx_load_modules()
    11:20170302:102008.299 loading module "/var/lib/zabbix/modules/zabbix_module_docker.so"
    11:20170302:102008.315 In zbx_module_api_version()
    11:20170302:102008.315 In zbx_module_init()
    11:20170302:102008.315 zabbix_module_docker v0.6.4, compilation time: Feb 17 2017 22:37:54
    11:20170302:102008.315 In zbx_docker_dir_detect()
    11:20170302:102008.316 Detected docker stat directory: /sys/fs/cgroup/
    11:20170302:102008.317 Detected used docker driver dir: system.slice/
    11:20170302:102008.317 Detected systemd docker - prefix/suffix will be used
    11:20170302:102008.317 Detected JoinController cpu,cpuacct
    11:20170302:102008.317 In zbx_docker_api_detect()
    11:20170302:102008.317 In zbx_module_docker_socket_query()
    11:20170302:102008.318 Docker's socket query: GET /_ping HTTP/1.0
    11:20170302:102008.321 Docker's socket response: OK
    11:20170302:102008.321 Docker's socket works - extended docker metrics are available
    11:20170302:102008.321 In zbx_module_item_list()
    11:20170302:102008.321 In zbx_module_item_timeout()
    11:20170302:102008.321 cannot find "zbx_module_history_write_cbs()" function in module "zabbix_module_docker.so": /var/lib/zabbix/modules/zabbix_module_docker.so: undefined symbol: zbx_module_history_write_cbs
    11:20170302:102008.321 loading module "/var/lib/zabbix/modules/zabbix_module_stress.so"
    11:20170302:102008.321 cannot find "zbx_module_history_write_cbs()" function in module "zabbix_module_stress.so": /var/lib/zabbix/modules/zabbix_module_stress.so: undefined symbol: zbx_module_history_write_cbs
    11:20170302:102008.321 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so
    11:20170302:102008.321 End of zbx_load_modules():SUCCEED
    11:20170302:102008.324 listener failed: zbx_tcp_listen() fatal error: unable to serve on any address [[-]:10050]

running without --net=host:

[root@balancer.unix.local ~]# docker run --name=dockbix-agent-xxl -p 10060:10050 --privileged --userns=host -v /:/rootfs:z -v /var/run:/var/run:z -e "ZA_Server=10.0.0.1" -e "ZA_DebugLevel=5" -d monitoringartist/dockbix-agent-xxl-limited:latest && docker logs -f dockbix-agent-xxl           
be933c15a701cc15c198a29c1633fb0c69be52337a034879b05638f5ad154b10
Dockbix Agent XXL v0.0.1b limited version
Copyright (C) 2014-2017 Jan Garaj - www.monitoringartist.com
Freeware licence - Usage of this binary is restricted to official monitoringartist Docker images only.
Starting Zabbix Agent [be933c15a701]. Zabbix 3.2.3 Dockbix XXL (2017-02-17) (revision 64610).
Press Ctrl+C to exit.
    11:20170302:102144.524 Starting Zabbix Agent [be933c15a701]. Zabbix 3.2.3 Dockbix XXL (2017-02-17) (revision 64610).
    11:20170302:102144.524 **** Enabled features ****
    11:20170302:102144.524 IPv6 support:          YES
    11:20170302:102144.524 TLS support:            NO
    11:20170302:102144.524 **************************
    11:20170302:102144.524 using configuration file: /etc/zabbix/zabbix_agentd.conf
    11:20170302:102144.524 In zbx_load_modules()
    11:20170302:102144.524 loading module "/var/lib/zabbix/modules/zabbix_module_docker.so"
    11:20170302:102144.536 In zbx_module_api_version()
    11:20170302:102144.536 In zbx_module_init()
    11:20170302:102144.536 zabbix_module_docker v0.6.4, compilation time: Feb 17 2017 22:37:54
    11:20170302:102144.536 In zbx_docker_dir_detect()
    11:20170302:102144.538 Detected docker stat directory: /sys/fs/cgroup/
    11:20170302:102144.538 Detected used docker driver dir: system.slice/
    11:20170302:102144.538 Detected systemd docker - prefix/suffix will be used
    11:20170302:102144.538 Detected JoinController cpu,cpuacct
    11:20170302:102144.538 In zbx_docker_api_detect()
    11:20170302:102144.538 In zbx_module_docker_socket_query()
    11:20170302:102144.539 Docker's socket query: GET /_ping HTTP/1.0
    11:20170302:102144.542 Docker's socket response: OK
    11:20170302:102144.542 Docker's socket works - extended docker metrics are available
    11:20170302:102144.542 In zbx_module_item_list()
    11:20170302:102144.542 In zbx_module_item_timeout()
    11:20170302:102144.542 cannot find "zbx_module_history_write_cbs()" function in module "zabbix_module_docker.so": /var/lib/zabbix/modules/zabbix_module_docker.so: undefined symbol: zbx_module_history_write_cbs
    11:20170302:102144.542 loading module "/var/lib/zabbix/modules/zabbix_module_stress.so"
    11:20170302:102144.543 cannot find "zbx_module_history_write_cbs()" function in module "zabbix_module_stress.so": /var/lib/zabbix/modules/zabbix_module_stress.so: undefined symbol: zbx_module_history_write_cbs
    11:20170302:102144.543 loaded modules: zabbix_module_docker.so, zabbix_module_stress.so
    11:20170302:102144.543 End of zbx_load_modules():SUCCEED
    11:20170302:102144.545 In init_collector_data()
    11:20170302:102144.545 In zbx_dshm_create() proj_id:112 size:0
    11:20170302:102144.545 End of zbx_dshm_create():SUCCEED shmid:-1
    11:20170302:102144.545 End of init_collector_data()
    11:20170302:102144.545 agent #0 started [main process]
    12:20170302:102144.545 agent #1 started [collector]
    12:20170302:102144.545 In init_cpu_collector()
    13:20170302:102144.546 agent #2 started [listener #1]
    13:20170302:102144.546 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]'
    12:20170302:102144.546 End of init_cpu_collector():SUCCEED
    12:20170302:102144.546 __zbx_zbx_setproctitle() title:'collector [processing data]'
    12:20170302:102144.546 In update_cpustats()
    12:20170302:102144.547 End of update_cpustats()
...
    12:20170302:102224.566 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
    14:20170302:102224.707 __zbx_zbx_setproctitle() title:'listener #2 [processing request]'
    14:20170302:102224.707 Requested [docker.mem[/balancer,total_cache]]
    14:20170302:102224.707 In zbx_module_docker_mem()
    14:20170302:102224.707 In zbx_module_docker_get_fci()
    14:20170302:102224.707 Translating container name to fci by using docker.inspect
    14:20170302:102224.707 In zbx_module_docker_inspect_exec()
    14:20170302:102224.707 In zbx_module_docker_socket_query()
    14:20170302:102224.708 Docker's socket query: GET /containers/balancer/json HTTP/1.0
    14:20170302:102224.711 Docker's socket response: {"Id":"56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249","Created":"2017-02-28T18:52:29.639804099Z","Path":"nginx","Args":["-g","daemon off;"],"State":{"Status":"running","Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":6537,"ExitCode":0,"Error":"","StartedAt":"2017-02-28T18:52:31.346249642Z","FinishedAt":"0001-01-01T00:00:00Z"},"Image":"sha256:35a5efe1468aeef7e709b1dee0ced4473e6a12b13e31799d9394b90799f0c136","ResolvConfPath":"/var/lib/docker/165536.165536/containers/56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249/resolv.conf","HostnamePath":"/var/lib/docker/165536.165536/containers/56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249/hostname","HostsPath":"/var/lib/docker/165536.165536/containers/56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249/hosts","LogPath":"","Name":"/balancer","RestartCount":0,"Driver":"devicemapper","MountLabel":"system_u:object_r:svirt_sandbox_file_t:s0:c614,c913","ProcessLabel":"system_u:system_r:svirt_lxc_net_t:s0:c614,c913","AppArmorProfile":"","ExecIDs":null,"HostConfig":{"Binds":["/srv/balancer/balancer/nginx_conf:/etc/nginx:z","/var/lib/docker/165536.165536/balancer/logs:/var/log/nginx:z"],"ContainerIDFile":"","LogConfig":{"Type":"journald","Config":{}},"NetworkMode":"default","PortBindings":{"4080/tcp":[{"HostIp":"","HostPort":"4080"}],"443/tcp":[{"HostIp":"","HostPort":"443"}],"4443/tcp":[{"HostIp":"","HostPort":"4443"}],"80/tcp":[{"HostIp":"","HostPort":"80"}]},"RestartPolicy":{"Name":"","MaximumRetryCount":0},"AutoRemove":false,"VolumeDriver":"","VolumesFrom":[],"CapAdd":null,"CapDrop":null,"Dns":null,"DnsOptions":null,"DnsSearch":null,"ExtraHosts":null,"GroupAdd":null,"IpcMode":"","Cgroup":"","Links":null,"OomScoreAdj":0,"PidMode":"","Privileged":false,"PublishAllPorts":false,"ReadonlyRootfs":false,"SecurityOpt":null,"UTSMode":"","UsernsMode":"","ShmSize":67108864,"Runtime":"docker-runc","ConsoleSize":[0,0],"Isolation":"","CpuShares":0,"Memory":0,"CgroupParent":"","BlkioWeight":0,"BlkioWeightDevice":null,"BlkioDeviceReadBps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteIOps":null,"CpuPeriod":0,"CpuQuota":0,"CpusetCpus":"","CpusetMems":"","Devices":null,"DiskQuota":0,"KernelMemory":0,"MemoryReservation":0,"MemorySwap":0,"MemorySwappiness":-1,"OomKillDisable":false,"PidsLimit":0,"Ulimits":null,"CpuCount":0,"CpuPercent":0,"IOMaximumIOps":0,"IOMaximumBandwidth":0},"GraphDriver":{"Name":"devicemapper","Data":{"DeviceId":"70","DeviceName":"docker-253:13-1573440-d1f9a3e81bc9da0922d0fcc666444f27d07265bea7fce3d3c9cd409846af9c55","DeviceSize":"10737418240"}},"Mounts":[{"Source":"/srv/balancer/balancer/nginx_conf","Destination":"/etc/nginx","Mode":"z","RW":true,"Propagation":"rprivate"},{"Source":"/var/lib/docker/165536.165536/balancer/logs","Destination":"/var/log/nginx","Mode":"z","RW":true,"Propagation":"rprivate"}],"Config":{"Hostname":"56e330729752","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"4080/tcp":{},"443/tcp":{},"4443/tcp":{},"80/tcp":{}},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["HOST_URL=10.0.0.5","PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","SRC_PATH=/var/www/smart"],"Cmd":["nginx","-g","daemon off;"],"Image":"adm.cloud.local:5000/balancer:0.1","Volumes":{"/etc/nginx":{},"/var/log/nginx":{}},"WorkingDir":"/var/www/smart","Entrypoint":null,"OnBuild":null,"Labels":{"com.docker.compose.config-hash":"e927559e6a8ebdea872ddc291b211cd097e0fd9961fbb9fc5dc69c2be4d60d56","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"balancer","com.docker.compose.service":"balancer","com.docker.compose.version":"1.10.0"}},"NetworkSettings":{"Bridge":"","SandboxID":"74bcb79aa41a7874cf3eba85d8e6fc35755cd069b913df2668927e329dec5267","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{"4080/tcp":[{"HostIp":"0.0.0.0","HostPort":"4080"}],"443/tcp":[{"HostIp":"0.0.0.0","HostPort":"443"}],"4443/tcp":[{"HostIp":"0.0.0.0","HostPort":"4443"}],"80/tcp":[{"HostIp":"0.0.0.0","HostPort":"80"}]},"SandboxKey":"/var/run/docker/netns/74bcb79aa41a","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"2fc8593d012b62763bf02c103f1cb392289a6ff0dbbdea9134a403420660b524","Gateway":"172.17.0.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","MacAddress":"02:42:ac:11:00:02","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"6e8b7b69f892dc2f74620e7be8749b69f27f01b158450407249b160eff32363c","EndpointID":"2fc8593d012b62763bf02c103f1cb392289a6ff0dbbdea9134a403420660b524","Gateway":"172.17.0.1","IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}}}
    14:20170302:102224.711 Item [Id] found in the received JSON object: 56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249
    14:20170302:102224.711 zbx_module_docker_inspect_exec OK: 56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249
    14:20170302:102224.711 Metric source file: /sys/fs/cgroup/memory/system.slice/docker-56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249.scope/memory.stat
    14:20170302:102224.711 Looking metric total_cache in memory.stat file
    14:20170302:102224.711 Id: 56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249; metric: total_cache; value: 17108992
    14:20170302:102224.711 Sending back [17108992]
jangaraj commented 7 years ago

It looks OK - dir detection is ok - /sys/fs/cgroup/system.slice/ will be used:

    11:20170302:102144.538 Detected docker stat directory: /sys/fs/cgroup/
    11:20170302:102144.538 Detected used docker driver dir: system.slice/
    11:20170302:102144.538 Detected systemd docker - prefix/suffix will be used

Metric query looks OK as well:

    14:20170302:102224.707 Requested [docker.mem[/balancer,total_cache]]
    14:20170302:102224.707 In zbx_module_docker_mem()
    14:20170302:102224.707 In zbx_module_docker_get_fci()
    14:20170302:102224.707 Translating container name to fci by using docker.inspect
    14:20170302:102224.707 In zbx_module_docker_inspect_exec()
    14:20170302:102224.707 In zbx_module_docker_socket_query()
    14:20170302:102224.708 Docker's socket query: GET /containers/balancer/json HTTP/1.0
    14:20170302:102224.711 Docker's socket response: {"Id":"56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249","Created":"2017-02-28T18:52:29.639804099Z","Path":"nginx","Args":["-g","daemon off;"],"State":{"Status":"running","Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":6537,"ExitCode":0,"Error":"","StartedAt":"2017-02-28T18:52:31.346249642Z","FinishedAt":"0001-01-01T00:00:00Z"},"Image":"sha256:35a5efe1468aeef7e709b1dee0ced4473e6a12b13e31799d9394b90799f0c136","ResolvConfPath":"/var/lib/docker/165536.165536/containers/56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249/resolv.conf","HostnamePath":"/var/lib/docker/165536.165536/containers/56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249/hostname","HostsPath":"/var/lib/docker/165536.165536/containers/56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249/hosts","LogPath":"","Name":"/balancer","RestartCount":0,"Driver":"devicemapper","MountLabel":"system_u:object_r:svirt_sandbox_file_t:s0:c614,c913","ProcessLabel":"system_u:system_r:svirt_lxc_net_t:s0:c614,c913","AppArmorProfile":"","ExecIDs":null,"HostConfig":{"Binds":["/srv/balancer/balancer/nginx_conf:/etc/nginx:z","/var/lib/docker/165536.165536/balancer/logs:/var/log/nginx:z"],"ContainerIDFile":"","LogConfig":{"Type":"journald","Config":{}},"NetworkMode":"default","PortBindings":{"4080/tcp":[{"HostIp":"","HostPort":"4080"}],"443/tcp":[{"HostIp":"","HostPort":"443"}],"4443/tcp":[{"HostIp":"","HostPort":"4443"}],"80/tcp":[{"HostIp":"","HostPort":"80"}]},"RestartPolicy":{"Name":"","MaximumRetryCount":0},"AutoRemove":false,"VolumeDriver":"","VolumesFrom":[],"CapAdd":null,"CapDrop":null,"Dns":null,"DnsOptions":null,"DnsSearch":null,"ExtraHosts":null,"GroupAdd":null,"IpcMode":"","Cgroup":"","Links":null,"OomScoreAdj":0,"PidMode":"","Privileged":false,"PublishAllPorts":false,"ReadonlyRootfs":false,"SecurityOpt":null,"UTSMode":"","UsernsMode":"","ShmSize":67108864,"Runtime":"docker-runc","ConsoleSize":[0,0],"Isolation":"","CpuShares":0,"Memory":0,"CgroupParent":"","BlkioWeight":0,"BlkioWeightDevice":null,"BlkioDeviceReadBps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteIOps":null,"CpuPeriod":0,"CpuQuota":0,"CpusetCpus":"","CpusetMems":"","Devices":null,"DiskQuota":0,"KernelMemory":0,"MemoryReservation":0,"MemorySwap":0,"MemorySwappiness":-1,"OomKillDisable":false,"PidsLimit":0,"Ulimits":null,"CpuCount":0,"CpuPercent":0,"IOMaximumIOps":0,"IOMaximumBandwidth":0},"GraphDriver":{"Name":"devicemapper","Data":{"DeviceId":"70","DeviceName":"docker-253:13-1573440-d1f9a3e81bc9da0922d0fcc666444f27d07265bea7fce3d3c9cd409846af9c55","DeviceSize":"10737418240"}},"Mounts":[{"Source":"/srv/balancer/balancer/nginx_conf","Destination":"/etc/nginx","Mode":"z","RW":true,"Propagation":"rprivate"},{"Source":"/var/lib/docker/165536.165536/balancer/logs","Destination":"/var/log/nginx","Mode":"z","RW":true,"Propagation":"rprivate"}],"Config":{"Hostname":"56e330729752","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"4080/tcp":{},"443/tcp":{},"4443/tcp":{},"80/tcp":{}},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["HOST_URL=10.0.0.5","PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","SRC_PATH=/var/www/smart"],"Cmd":["nginx","-g","daemon off;"],"Image":"adm.cloud.local:5000/balancer:0.1","Volumes":{"/etc/nginx":{},"/var/log/nginx":{}},"WorkingDir":"/var/www/smart","Entrypoint":null,"OnBuild":null,"Labels":{"com.docker.compose.config-hash":"e927559e6a8ebdea872ddc291b211cd097e0fd9961fbb9fc5dc69c2be4d60d56","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"balancer","com.docker.compose.service":"balancer","com.docker.compose.version":"1.10.0"}},"NetworkSettings":{"Bridge":"","SandboxID":"74bcb79aa41a7874cf3eba85d8e6fc35755cd069b913df2668927e329dec5267","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{"4080/tcp":[{"HostIp":"0.0.0.0","HostPort":"4080"}],"443/tcp":[{"HostIp":"0.0.0.0","HostPort":"443"}],"4443/tcp":[{"HostIp":"0.0.0.0","HostPort":"4443"}],"80/tcp":[{"HostIp":"0.0.0.0","HostPort":"80"}]},"SandboxKey":"/var/run/docker/netns/74bcb79aa41a","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"2fc8593d012b62763bf02c103f1cb392289a6ff0dbbdea9134a403420660b524","Gateway":"172.17.0.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","MacAddress":"02:42:ac:11:00:02","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"6e8b7b69f892dc2f74620e7be8749b69f27f01b158450407249b160eff32363c","EndpointID":"2fc8593d012b62763bf02c103f1cb392289a6ff0dbbdea9134a403420660b524","Gateway":"172.17.0.1","IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}}}
    14:20170302:102224.711 Item [Id] found in the received JSON object: 56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249
    14:20170302:102224.711 zbx_module_docker_inspect_exec OK: 56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249
    14:20170302:102224.711 Metric source file: /sys/fs/cgroup/memory/system.slice/docker-56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249.scope/memory.stat
    14:20170302:102224.711 Looking metric total_cache in memory.stat file
    14:20170302:102224.711 Id: 56e330729752b064e9dacc6960edca4e788cb441d95614499f01740620d1f249; metric: total_cache; value: 17108992
    14:20170302:102224.711 Sending back [17108992]

What's a problem here?

sizerus commented 7 years ago

What's a problem here?

no problem! Whats diffirence between zabbix-agent-xxl-limited and dockbix-agent-xxl-limited? If i can use dockbix instead zabbix, then the problem is solved. Thank you!

jangaraj commented 7 years ago

dockbix-agent-xxl-limited is a 2nd generation of zabbix-agent-xxl-limited.