Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot detect docker stat directory #117

Closed
ninuxer opened this issue Mar 19, 2019 · 9 comments
Closed

Cannot detect docker stat directory #117

ninuxer opened this issue Mar 19, 2019 · 9 comments

Comments

@ninuxer
Copy link

ninuxer commented Mar 19, 2019

hi:
i got this log (loglevel=4):
23465:20190319:165428.319 In zbx_docker_dir_detect() 23465:20190319:165428.319 Cannot detect docker stat directory

and i run command line test like this:
[root@monitor bin]# ./zabbix_get -s 172.16.2.159 -k docker.info[Images] 15 [root@monitor bin]# ./zabbix_get -s 172.16.2.159 -k docker.up[9fccde245c8b953c35b3b11503e2c1116d59a9036520ea23c47e89d0bc062341] ZBX_NOTSUPPORTED: docker.up check is not available at the moment - no stat directory

and my question is : How can i set the stat dir? thanks

@jangaraj
Copy link
Member

You can't. Stat dir is detected by module based on the OS, Docker execution driver, ... Please provide docker info, uname -a, OS version.

@ninuxer
Copy link
Author

ninuxer commented Mar 19, 2019

You can't. Stat dir is detected by module based on the OS, Docker execution driver, ... Please provide docker info, uname -a, OS version.

Thanks for your reply!

"docker info" display like this:

[root@harbor master]# docker info
Containers: 9
 Running: 7
 Paused: 0
 Stopped: 2
Images: 15
Server Version: 17.12.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.16.6-1.el6.x86_64
Operating System: <unknown>
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.848GiB
Name: harborfree.mytest.com
ID: KSFY:FJX7:NQ2D:4POC:C2EG:ZNH6:HVRM:2O27:23O7:TDSR:UDMT:KPGD
Docker Root Dir: /opt/websuite/docker/data
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 harbor.mytest.com
 127.0.0.0/8
Registry Mirrors:
 http://harbor.mytest.com/
Live Restore Enabled: false

"uname -a" and "cat /etc/redhat-release" display like this:

[root@harbor master]# uname -a
Linux harbor.mytest.com 4.16.6-1.el6.x86_64 #1 SMP Mon May 7 13:44:25 CST 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@harbor master]# cat /etc/redhat-release 
CentOS release 6.5 (Final)

docker ps display like this:

[root@harbor master]# docker ps
CONTAINER ID        IMAGE                                    COMMAND                  CREATED             STATUS                          PORTS                       NAMES
9fccde245c8b        google/cadvisor:v0.24.1                  "/usr/bin/cadvisor -…"   7 hours ago         Up 7 hours                      0.0.0.0:8080->8080/tcp      cadvisor
f95e03adbb20        goharbor/nginx-photon:v1.6.0             "nginx -g 'daemon of…"   3 months ago        Restarting (1) 15 seconds ago                               nginx
6fe75dfb81a2        goharbor/redis-photon:v1.6.0             "docker-entrypoint.s…"   3 months ago        Up 9 hours                      6379/tcp                    redis

Is stat dir used to get the status for containers,like cpu、mem、blkio...?On my system, these directories are in / sys / FS / cgroups / docker /${CONTAINER_ID}

[root@harbor master]# ls /sys/fs/cgroup/docker/9fccde245c8b953c35b3b11503e2c1116d59a9036520ea23c47e89d0bc062341/
blkio.io_merged                            cpuacct.usage_percpu_sys         hugetlb.2MB.usage_in_bytes

@jangaraj
Copy link
Member

Ok, please provide zabbix_agentd logs (from agent start time) - https://github.com/monitoringartist/zabbix-docker-monitoring#troubleshooting

@ninuxer
Copy link
Author

ninuxer commented Mar 19, 2019

Ok, please provide zabbix_agentd logs (from agent start time) - https://github.com/monitoringartist/zabbix-docker-monitoring#troubleshooting

this is my zabbix agent log:

[root@harborfree master]# head -n 500 /opt/logs/zabbix_agentd/zabbix_agentd.log
29234:20190319:174632.274 Starting Zabbix Agent [172.16.2.159]. Zabbix 3.0.9 (revision 67444).
29234:20190319:174632.274 **** Enabled features ****
29234:20190319:174632.274 IPv6 support: NO
29234:20190319:174632.274 TLS support: NO
29234:20190319:174632.275 **************************
29234:20190319:174632.275 using configuration file: /opt/config/zabbix_agentd/zabbix_agentd.conf
29234:20190319:174632.275 In load_modules()
29234:20190319:174632.275 loading module "/opt/websuite/zabbix_agentd/lib/modules/zabbix_module_docker.so"
29234:20190319:174632.275 In zbx_module_api_version()
29234:20190319:174632.275 In zbx_module_init()
29234:20190319:174632.275 zabbix_module_docker v0.6.7, compilation time: Jul 28 2017 12:03:48
29234:20190319:174632.275 In zbx_docker_dir_detect()
29234:20190319:174632.275 Cannot detect docker stat directory
29234:20190319:174632.276 In zbx_docker_api_detect()
29234:20190319:174632.276 In zbx_module_docker_socket_query()
29234:20190319:174632.276 Docker's socket query: GET /_ping HTTP/1.0
29234:20190319:174632.277 Docker's socket response: OK
29234:20190319:174632.277 Docker's socket works - extended docker metrics are available
29234:20190319:174632.277 In zbx_module_item_timeout()
29234:20190319:174632.277 In register_module()
29234:20190319:174632.277 End of register_module():SUCCEED
29234:20190319:174632.277 In zbx_module_item_list()
29234:20190319:174632.277 loaded modules: zabbix_module_docker.so
29234:20190319:174632.277 End of load_modules():SUCCEED
29234:20190319:174632.277 In is_ip4() ip:'172.16.2.159'
29234:20190319:174632.277 End of is_ip4():SUCCEED
29234:20190319:174632.277 In init_collector_data()
29234:20190319:174632.277 In zbx_dshm_create() proj_id:112 size:0
29234:20190319:174632.278 End of zbx_dshm_create():SUCCEED shmid:-1
29234:20190319:174632.278 End of init_collector_data()
29234:20190319:174632.278 agent #0 started [main process]
29236:20190319:174632.278 agent #1 started [collector]
29236:20190319:174632.278 In init_cpu_collector()
29236:20190319:174632.278 End of init_cpu_collector():SUCCEED
29236:20190319:174632.279 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174632.279 In update_cpustats()
29236:20190319:174632.279 End of update_cpustats()
29236:20190319:174632.279 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29240:20190319:174632.280 agent #5 started [listener #4]
29240:20190319:174632.280 __zbx_zbx_setproctitle() title:'listener #4 [waiting for connection]'
29239:20190319:174632.280 agent #4 started [listener #3]
29239:20190319:174632.280 __zbx_zbx_setproctitle() title:'listener #3 [waiting for connection]'
29242:20190319:174632.281 agent #7 started [active checks #1]
29242:20190319:174632.281 In init_active_metrics()
29242:20190319:174632.281 buffer: first allocation for 4096 elements
29242:20190319:174632.281 End of init_active_metrics()
29242:20190319:174632.281 In send_buffer() host:'172.16.2.213' port:10051 entries:0/4096
29242:20190319:174632.282 End of send_buffer():SUCCEED
29242:20190319:174632.282 __zbx_zbx_setproctitle() title:'active checks #1 [getting list of active checks]'
29242:20190319:174632.282 In refresh_active_checks() host:'172.16.2.213' port:10051
29241:20190319:174632.282 agent #6 started [listener #5]
29241:20190319:174632.282 __zbx_zbx_setproctitle() title:'listener #5 [waiting for connection]'
29238:20190319:174632.282 agent #3 started [listener #2]
29238:20190319:174632.282 __zbx_zbx_setproctitle() title:'listener #2 [waiting for connection]'
29237:20190319:174632.283 agent #2 started [listener #1]
29237:20190319:174632.283 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]'
29236:20190319:174633.279 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174633.279 In update_cpustats()
29236:20190319:174633.280 End of update_cpustats()
29236:20190319:174633.280 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29236:20190319:174634.280 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174634.280 In update_cpustats()
29236:20190319:174634.280 End of update_cpustats()
29236:20190319:174634.280 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29236:20190319:174635.281 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174635.281 In update_cpustats()
29236:20190319:174635.281 End of update_cpustats()
29236:20190319:174635.281 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29242:20190319:174635.282 active check configuration update from [172.16.2.213:10051] started to fail (cannot connect to [[172.16.2.213]:10051]: [4] Interrupted system call)
29242:20190319:174635.282 End of refresh_active_checks():FAIL
29242:20190319:174635.282 __zbx_zbx_setproctitle() title:'active checks #1 [processing active checks]'
29242:20190319:174635.282 In process_active_checks() server:'172.16.2.213' port:10051
29242:20190319:174635.282 End of process_active_checks()
29242:20190319:174635.283 In get_min_nextcheck()
29242:20190319:174635.283 End of get_min_nextcheck():-1
29242:20190319:174635.283 In send_buffer() host:'172.16.2.213' port:10051 entries:0/4096
29242:20190319:174635.283 End of send_buffer():SUCCEED
29242:20190319:174635.283 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
29238:20190319:174636.194 __zbx_zbx_setproctitle() title:'listener #2 [processing request]'
29238:20190319:174636.194 Requested [docker.cstatus[Up]]
29238:20190319:174636.194 In zbx_module_docker_cstatus()
29238:20190319:174636.194 In zbx_module_docker_socket_query()
29238:20190319:174636.195 Docker's socket query: GET /containers/json?all=0 HTTP/1.0
29238:20190319:174636.200 Docker's socket response: [{"Id":"9fccde245c8b953c35b3b11503e2c1116d59a9036520ea23c47e89d0bc062341","Names":["/cadvisor"],"Image":"google/cadvisor:v0.24.1","ImageID":"sha256:cc8254dd08c6ff3e6521fab4fdd9cc361c704f2fa51007ce230035f0b391f118","Command":"/usr/bin/cadvisor -logtostderr","Created":1552977610,"Ports":[{"IP":"0.0.0.0","PrivatePort":8080,"PublicPort":8080,"Type":"tcp"}],"Labels":{},"State":"running","Status":"Up 3 hours","HostConfig":{"NetworkMode":"default"},"NetworkSettings":{"Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"6601796fc3529489212da6d51b5440bdb46914c9a8b4770ffbe5d83fb0f977ff","EndpointID":"80fae64f612511cb42d6063f8b1e30e9c678ed79901003f436c1c6ac301ed57c","Gateway":"172.17.0.1","IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02","DriverOpts":null}}},"Mounts":[{"Type":"bind","Source":"/","Destination":"/rootfs","Mode":"","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/sys","Destination":"/sys","Mode":"ro","RW":false,"Propagation":"rprivate"},{"Type":"bind","Source":"/var/lib/docker","Destination":"/var/lib/docker","Mode":"ro","RW":false,"Propagation":"rprivate"},{"Type":"bind","Source":"/var/run","Destination":"/var/run","Mode":"","RW":true,"Propagation":"rprivate"}]},{"Id":"f95e03adbb208f0fb4f8a0a2a60ed5cfbf2bab309873075ef92f7d2d8ff6405b","Names":["/nginx"],"Image":"goharbor/nginx-photon:v1.6.0","ImageID":"sha256:81df0f8a78c077c0cc2f01ccc6737c8e3a142f478a68c5bc19faba657ff3ec75","Command":"nginx -g 'daemon off;'","Created":1542782308,"Ports":[],"Labels":{"build-date":"20180816","com.docker.compose.config-hash":"9231bfa9f0a96e97f944113bc17e43c660c1c6137dc70e3587ea7df7d88a67f8","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"harbor","com.docker.compose.service":"proxy","com.docker.compose.version":"1.7.1","name":"Photon OS 1.0 Base Image","vendor":"VMware"},"State":"restarting","Status":"Restarting (1) 4 seconds ago","HostConfig":{"NetworkMode":"harbor_harbor"},"NetworkSettings":{"Networks":{"harbor_harbor":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"77171c0a7fd51edb4030373e59a1beb642adbf2d9ce418d7fa9361709348b973","EndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"","DriverOpts":null}}},"Mounts":[{"Type":"bind","Source":"/usr/share/zoneinfo/Asia/Shanghai","Destination":"/etc/localtime","Mode":"rw","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/tmp/harbor/common/config/nginx","Destination":"/etc/nginx","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"volume","Name":"b304f8f6daf07c33a6747fa2518d01c51c0c5d55904e0b3e5b251c778e9563c3","Source":"","Destination":"/run","Driver":"local","Mode":"","RW":true,"Propagation":""},{"Type":"volume","Name":"0fc73a92c3288edf48806b965c52ebeb696d40fde729fa552e3d7a45265ab2c5","Source":"","Destination":"/var/cache/nginx","Driver":"local","Mode":"","RW":true,"Propagation":""},{"Type":"volume","Name":"5b816ef6b55c11c10764d8c5bd4e0e4eafa743264a056702232fbbf18e78b061","Source":"","Destination":"/var/log/nginx","Driver":"local","Mode":"","RW":true,"Propagation":""}]},{"Id":"6fe75dfb81a2ca14e695cb22f88ab628a2e6471dbfc7fb937a52a9c88f5172d8","Names":["/redis"],"Image":"goharbor/redis-photon:v1.6.0","ImageID":"sha256:745667dc5aa8f155f914287c518b498f25ffcd47b5935bb2417355fb0a02bf5e","Command":"docker-entrypoint.sh redis-server /etc/redis.conf","Created":1542782306,"Ports":[{"PrivatePort":6379,"Type":"tcp"}],"Labels":{"build-date":"20180816","com.docker.compose.config-hash":"595fff7917feabef5ea33bb635822b0a1bee7af661fb3f582f05ca528a457392","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"harbor","com.docker.compose.service":"redis","com.docker.compose.version":"1.7.1","name":"Photon OS 1.0 Base Image","vendor":"VMware"},"State":"running","Status":"Up 5 hours","HostConfig":{"NetworkMode":"harbor_harbor"},"NetworkSettings":{"Networks":{"harbor_harbor":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"77171c0a7fd51edb4030373e59a1beb642adbf2d9ce418d7fa9361709348b973","EndpointID":"d08ded3f50f83d275583043ca39d85b48c45ddd387ad641a7360e424c1c3b79c","Gateway":"172.18.0.1","IPAddress":"172.18.0.8","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:12:00:08","DriverOpts":null}}},"Mounts":[{"Type":"bind","Source":"/data/redis","Destination":"/var/lib/redis","Mode":"rw","RW":true,"Propagation":"rprivate"}]},{"Id":"f4eba59ce07f9f2d7f62fdd6bf5ca0b6c88291996c3329c11531d4f2c2ce84df","Names":["/harbor-db"],"Image":"goharbor/harbor-db:v1.6.0","ImageID":"sha256:5c39f18ce34822dac6506db073b915ebab35b6f65a180e8855bae69a6ad23b76","Command":"/entrypoint.sh postgres","Created":1542782306,"Ports":[{"PrivatePort":5432,"Type":"tcp"}],"Labels":{"build-date":"20180816","com.docker.compose.config-hash":"78bc9607cf83c701e9f3a0d75a5c906d2eefbb5095ce2724ddc72bdcc70fb935","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"harbor","com.docker.compose.service":"postgresql","com.docker.compose.version":"1.7.1","name":"Photon OS 1.0 Base Image","vendor":"VMware"},"State":"running","Status":"Up 5 hours (healthy)","HostConfig":{"NetworkMode":"harbor_harbor"},"NetworkSettings":{"Networks":{"harbor_harbor":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"77171c0a7fd51edb4030373e59a1beb642adbf2d9ce418d7fa9361709348b973","EndpointID":"daf37aa5322d43d3faa8254a0d57404b4fb7186ca0b5cf0243cb8862f42d84dc","Gateway":"172.18.0.1","IPAddress":"172.18.0.6","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:12:00:06","DriverOpts":null}}},"Mounts":[{"Type":"bind","Source":"/usr/share/zoneinfo/Asia/Shanghai","Destination":"/etc/localtime","Mode":"rw","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/data/database","Destination":"/var/lib/postgresql/data","Mode":"z","RW":true,"Propagation":"rprivate"}]},{"Id":"44733f85c79a76d185a55bb3c754e48724c7c663789cb6206a6264a0ce15a31d","Names":["/harbor-adminserver"],"Image":"goharbor/harbor-adminserver:v1.6.0","ImageID":"sha256:14d9ee1bbda353a6f2a5df16adb43e2e5491473c8c8ce17537040fabc121fe5d","Command":"/harbor/start.sh","Created":1542782306,"Ports":[],"Labels":{"build-date":"20180816","com.docker.compose.config-hash":"7dd48be0d929f54d2cf1f1ea743ed68954d9c0de11f014f7161282c4c751e343","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"harbor","com.docker.compose.service":"adminserver","com.docker.compose.version":"1.7.1","name":"Photon OS 1.0 Base Image","vendor":"VMware"},"State":"running","Status":"Up 5 hours (healthy)","HostConfig":{"NetworkMode":"harbor_harbor"},"NetworkSettings":{"Networks":{"harbor_harbor":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"77171c0a7fd51edb4030373e59a1beb642adbf2d9ce418d7fa9361709348b973","EndpointID":"8027b69a6550a70f89a29d36ffd7fb50640cacf224e3d4a3e5bea07976584d09","Gateway":"172.18.0.1","IPAddress":"172.18.0.3","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:12:00:03","DriverOpts":null}}},"Mounts":[{"Type":"bind","Source":"/data","Destination":"/data","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/data/config","Destination":"/etc/adminserver/config","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/data/secretkey","Destination":"/etc/adminserver/key","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/usr/share/zoneinfo/Asia/Shanghai","Destination":"/etc/localtime","Mode":"rw","RW":true,"Propagation":"rprivate"}]},{"Id":"e13b98cb4079e95c1905126b2be63dd98d1651fa659189997b7a7b81ca130248","Names":["/registry"],"Image":"goharbor/registry-photon:v2.6.2-v1.6.0","ImageID":"sha256:1ec7d8d4f0fdf2253ac85a3162ba7cd005e51fe64816949955e59c9870e182a3","Command":"/entrypoint.sh /etc/registry/config.yml","Created":1542782306,"Ports":[],"Labels":{"build-date":"20180816","com.docker.compose.config-hash":"679e93b125bc7a8875b75c4541ed4d3ca8d974e54bc5f08278f31951549d2c1b","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"harbor","com.docker.compose.service":"registry","com.docker.compose.version":"1.7.1","name":"Photon OS 1.0 Base Image","vendor":"VMware"},"State":"restarting","Status":"Restarting (1) 53 seconds ago","HostConfig":{"NetworkMode":"harbor_harbor"},"NetworkSettings":{"Networks":{"harbor_harbor":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"77171c0a7fd51edb4030373e59a1beb642adbf2d9ce418d7fa9361709348b973","EndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"","DriverOpts":null}}},"Mounts":[{"Type":"bind","Source":"/usr/share/zoneinfo/Asia/Shanghai","Destination":"/etc/localtime","Mode":"rw","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/tmp/harbor/common/config/registry","Destination":"/etc/registry","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/data/registry","Destination":"/storage","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"volume","Name":"0177716dbd26f85f60836588084fedc337d4e26eb33b76491d9aca386ac41385","Source":"","Destination":"/var/lib/registry","Driver":"local","Mode":"","RW":true,"Propagation":""}]},{"Id":"1f992437065b961ae6c5280d4fe483a4700a3f51a89694cf7f37479f92ea7598","Names":["/harbor-log"],"Image":"goharbor/harbor-log:v1.6.0","ImageID":"sha256:0f474b9d456543da70af1dd015c0556cef08e91db9f216658942d71495daa32f","Command":"/bin/sh -c /usr/local/bin/start.sh","Created":1542782306,"Ports":[{"IP":"127.0.0.1","PrivatePort":10514,"PublicPort":1514,"Type":"tcp"}],"Labels":{"build-date":"20180816","com.docker.compose.config-hash":"2f099f3f048b28fe46ed3a43828b419903cfcfe8b442a6fe1b1d0c8dd7302c44","com.docker.compose.container-number":"1","com.docker.compose.oneoff":"False","com.docker.compose.project":"harbor","com.docker.compose.service":"log","com.docker.compose.version":"1.7.1","name":"Photon OS 1.0 Base Image","vendor":"VMware"},"State":"running","Status":"Up 5 hours (healthy)","HostConfig":{"NetworkMode":"harbor_harbor"},"NetworkSettings":{"Networks":{"harbor_harbor":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"77171c0a7fd51edb4030373e59a1beb642adbf2d9ce418d7fa9361709348b973","EndpointID":"1db5d50911b85ce4b184be367ae446620838d9136e3781fbff8e8d45657698df","Gateway":"172.18.0.1","IPAddress":"172.18.0.5","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:12:00:05","DriverOpts":null}}},"Mounts":[{"Type":"bind","Source":"/tmp/harbor/common/config/log","Destination":"/etc/logrotate.d","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"volume","Name":"7c0f1a26a2500b6c3b3f46be6669bac4656a1bfe6ba9e7e09217fb18593dab5e","Source":"","Destination":"/run","Driver":"local","Mode":"","RW":true,"Propagation":""},{"Type":"bind","Source":"/var/log/harbor","Destination":"/var/log/docker","Mode":"z","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/usr/share/zoneinfo/Asia/Shanghai","Destination":"/etc/localtime","Mode":"rw","RW":true,"Propagation":"rprivate"}]}]
29238:20190319:174636.200 Count of containers in Up status: 7
29238:20190319:174636.201 Sending back [7]
29238:20190319:174636.201 __zbx_zbx_setproctitle() title:'listener #2 [waiting for connection]'
29236:20190319:174636.281 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174636.281 In update_cpustats()
29236:20190319:174636.282 End of update_cpustats()
29236:20190319:174636.282 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29242:20190319:174636.283 In send_buffer() host:'172.16.2.213' port:10051 entries:0/4096
29242:20190319:174636.283 End of send_buffer():SUCCEED
29242:20190319:174636.283 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
29236:20190319:174637.282 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174637.282 In update_cpustats()
29236:20190319:174637.282 End of update_cpustats()
29236:20190319:174637.282 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29242:20190319:174637.283 In send_buffer() host:'172.16.2.213' port:10051 entries:0/4096
29242:20190319:174637.284 End of send_buffer():SUCCEED
29242:20190319:174637.284 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
29240:20190319:174637.935 __zbx_zbx_setproctitle() title:'listener #4 [processing request]'
29240:20190319:174637.935 Requested [docker.up[9fccde245c8b953c35b3b11503e2c1116d59a9036520ea23c47e89d0bc062341]]
29240:20190319:174637.935 In zbx_module_docker_up()
29240:20190319:174637.935 docker.up check is not available at the moment - no stat directory
29240:20190319:174637.935 Sending back [ZBX_NOTSUPPORTED: docker.up check is not available at the moment - no stat directory]
29240:20190319:174637.935 __zbx_zbx_setproctitle() title:'listener #4 [waiting for connection]'
29236:20190319:174638.282 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174638.283 In update_cpustats()
29236:20190319:174638.283 End of update_cpustats()
29236:20190319:174638.283 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29242:20190319:174638.284 In send_buffer() host:'172.16.2.213' port:10051 entries:0/4096
29242:20190319:174638.284 End of send_buffer():SUCCEED
29242:20190319:174638.284 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
29236:20190319:174639.283 __zbx_zbx_setproctitle() title:'collector [processing data]'
29236:20190319:174639.283 In update_cpustats()
29236:20190319:174639.283 End of update_cpustats()
29236:20190319:174639.283 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
29242:20190319:174639.284 In send_buffer() host:'172.16.2.213' port:10051 entries:0/4096
29242:20190319:174639.285 End of send_buffer():SUCCEED
29242:20190319:174639.285 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
29236:20190319:174640.284 __zbx_zbx_setproctitle() title:'collector [processing data]'

@jangaraj
Copy link
Member

Please compile https://github.com/monitoringartist/zabbix-docker-monitoring#compilation and use v0.6.8 module version.

@ninuxer
Copy link
Author

ninuxer commented Mar 19, 2019

Please compile https://github.com/monitoringartist/zabbix-docker-monitoring#compilation and use v0.6.8 module version.

I've tried, but got the same problem.

@jangaraj
Copy link
Member

@ninuxer
Copy link
Author

ninuxer commented Mar 19, 2019

So, please provide logs again - https://github.com/monitoringartist/zabbix-docker-monitoring#troubleshooting

i build from master release,version is 0.6.9,and the log get another problem:

./zabbix_get -s 172.16.2.227 -k docker.modver
v0.6.9
[root@monitor bin]# ./zabbix_get -s 172.16.2.227 -k docker.info[Images]
280
[root@monitor bin]# ./zabbix_get -s 172.16.2.227 -k docker.cpu[c1efc74e7359ac4a345cdade31622f21d9efd609b5815cc0bad908ac284a4c50,total]
ZBX_NOTSUPPORTED: docker.cpu metrics are not available at the moment - no stat directory

logs like this:

25533:20190319:224017.630 using configuration file: /opt/config/zabbix_agentd/zabbix_agentd.conf
25533:20190319:224017.630 In zbx_load_modules()
25533:20190319:224017.630 loading module "/opt/websuite/zabbix_agentd/lib/modules/zabbix_module_docker.so"
25533:20190319:224017.630 In zbx_module_api_version()
25533:20190319:224017.630 In zbx_module_init()
25533:20190319:224017.630 zabbix_module_docker v0.6.9, compilation time: Mar 19 2019 10:11:49
25533:20190319:224017.630 In zbx_docker_dir_detect()
25533:20190319:224017.634 Cannot detect docker stat directory
25533:20190319:224017.634 In zbx_docker_api_detect()
25533:20190319:224017.634 In zbx_module_docker_socket_query()
25533:20190319:224017.634 Docker's socket query: GET /_ping HTTP/1.0
25533:20190319:224017.635 Docker's socket response: OK
25533:20190319:224017.635 Docker's socket works - extended docker metrics are available
25533:20190319:224017.635 In zbx_module_item_list()
25533:20190319:224017.635 In zbx_module_item_timeout()
25533:20190319:224017.635 cannot find "zbx_module_history_write_cbs()" function in module "zabbix_module_docker.so": /opt/websuite/zabbix_agentd/lib/modules/zabbix_module_docker.so: undefined symbol: zbx_module_history_write_cbs
25533:20190319:224017.635 loaded modules: zabbix_module_docker.so
25533:20190319:224017.635 End of zbx_load_modules():SUCCEED
...
25539:20190319:224103.842 Requested [docker.info[Images]]
25539:20190319:224103.842 In zbx_module_docker_info()
25539:20190319:224103.842 In zbx_module_docker_socket_query()
25539:20190319:224103.842 Docker's socket query: GET /info HTTP/1.0
25539:20190319:224104.051 Docker's socket response: {"ID":"E2N3:IT7V:RNB5:PFKI:R7RB:Z7WG:5FEO:KFBE:URWK:FMMF:2R65:3W34","Containers":102,"ContainersRunning":101,"ContainersPaused":0,"ContainersStopped":1,"Images":280,"Driver":"overlay2","DriverStatus":[["Backing Filesystem","extfs"],["Supports d_type","true"],["Native Overlay Diff","true"]],"SystemStatus":null,"Plugins":{"Volume":["local"],"Network":["bridge","host","macvlan","null","overlay"],"Authorization":null,"Log":["awslogs","fluentd","gcplogs","gelf","journald","json-file","logentries","splunk","syslog"]},"MemoryLimit":true,"SwapLimit":true,"KernelMemory":true,"CpuCfsPeriod":true,"CpuCfsQuota":true,"CPUShares":true,"CPUSet":true,"IPv4Forwarding":true,"BridgeNfIptables":true,"BridgeNfIp6tables":true,"Debug":false,"NFd":663,"OomKillDisable":true,"NGoroutines":465,"SystemTime":"2019-03-19T22:41:03.982172297+08:00","LoggingDriver":"json-file","CgroupDriver":"cgroupfs","NEventsListener":0,"KernelVersion":"4.15.10-1.el6.x86_64","OperatingSystem":"","OSType":"linux","Architecture":"x86_64","IndexServerAddress":"https://index.docker.io/v1/","RegistryConfig":{"AllowNondistributableArtifactsCIDRs":[],"AllowNondistributableArtifactsHostnames":[],"InsecureRegistryCIDRs":["127.0.0.0/8"],"IndexConfigs":{"172.16.2.222:5000":{"Name":"172.16.2.222:5000","Mirrors":[],"Secure":false,"Official":false},"docker.io":{"Name":"docker.io","Mirrors":["http://172.16.2.205:5000/"],"Secure":true,"Official":true}},"Mirrors":["http://172.16.2.222:5000/"]},"NCPU":40,"MemTotal":135062851584,"GenericResources":null,"DockerRootDir":"/opt/websuite/docker/data","HttpProxy":"","HttpsProxy":"","NoProxy":"","Name":"s01.docker.ttp.com","Labels":[],"ExperimentalBuild":false,"ServerVersion":"17.12.0-ce","ClusterStore":"","ClusterAdvertise":"","Runtimes":{"runc":{"path":"docker-runc"}},"DefaultRuntime":"runc","Swarm":{"NodeID":"","NodeAddr":"","LocalNodeState":"inactive","ControlAvailable":false,"Error":"","RemoteManagers":null},"LiveRestoreEnabled":false,"Isolation":"","InitBinary":"docker-init","ContainerdCommit":{"ID":"89623f28b87a6004d4b785663257362d1658a729","Expected":"89623f28b87a6004d4b785663257362d1658a729"},"RuncCommit":{"ID":"b2567b37d7b75eb4cf325b77297b140ea686ce8f","Expected":"b2567b37d7b75eb4cf325b77297b140ea686ce8f"},"InitCommit":{"ID":"949e6fa","Expected":"949e6fa"},"SecurityOptions":["name=seccomp,profile=default"]}
25539:20190319:224104.051 Item [Images] found in the received JSON object: 280
25539:20190319:224104.051 Sending back [280]
...
25540:20190319:224233.941 Requested [docker.cpu[c1efc74e7359ac4a345cdade31622f21d9efd609b5815cc0bad908ac284a4c50,total]]
25540:20190319:224233.941 In zbx_module_docker_cpu()
25540:20190319:224233.941 docker.cpu metrics are not available at the moment - no stat directory
25540:20190319:224233.941 Sending back [ZBX_NOTSUPPORTED: docker.cpu metrics are not available at the moment - no stat directory]

@ninuxer ninuxer closed this as completed Mar 20, 2019
@jangaraj
Copy link
Member

Did you find a problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants