zabbix / zabbix-docker

Official Zabbix Dockerfiles
https://www.zabbix.com
GNU Affero General Public License v3.0
2.38k stars 1.37k forks source link

zabbix-agent2 docker error - docker.volumes_size template not working ! #832

Closed RedJohn14 closed 3 years ago

RedJohn14 commented 3 years ago

Hi,

I have used zabbix-agent2 in docker container. I used the Docker Template but have problems with docker.volumes_size Zabbix Server said not supported and show this error message but WHY?

Preprocessing failed for: {"LayersSize":810561408,"Images":[{"Id":"sha256:3c98f6a0dc1d16...
1. Failed: cannot extract value from json by path "$.Volumes[*].UsageData.Size.sum()": cannot apply aggregation function to empty array

How can i fix this please help!

dotneft commented 3 years ago

Is it issue with Zabbix template or Zabbix docker images?

RedJohn14 commented 3 years ago

Is it issue with Zabbix template or Zabbix docker images?

I have this issue with Zabbix template for docker monitor. But I have found the problem. I not use docker volumes like /var/lib/docker/volumes.

I have all data from containers inside the project folder e.g. /opt/scripts/project/nginx-server

In the folder nginx-server I have docker-compose.yml and a folder named data. All data from e.g. nginx-server are stored here. Any idea how i can modify this? How I can modify that zabbix will check data folders and not the volumes for total volume space used?

dotneft commented 3 years ago

Please use Zabbix bug tracker for such issues: https://support.zabbix.com/browse/ZBX-19277

RedJohn14 commented 3 years ago

Please use Zabbix bug tracker for such issues: https://support.zabbix.com/browse/ZBX-19277

Yeah I think it is because zabbix ONLY watch data and docker volumes in /var/lib/docker/volumes But I not used named volumes I use folders e.g. data in my project folder any idea how i can Monitor this?

e.g. From Sample docker-conpose project:

...
volumes:
    - ./data/sample:/etc/sample
...
dotneft commented 3 years ago

Please check, ask the issue I opened :-) Your question is not related to Docker images, it is related to Zabbix templates.