Closed galindro closed 6 years ago
Unfortunately, that's not possible because current code supports only non list values. docker.info[DriverStatus]
-> that's a request to return whole list:
[
"Pool Name",
"docker-docker--pool"
],
[
"Pool Blocksize",
"524.3kB"
],
...
What should be the output in this case? String? What if you want to select only one particular item value from the list? It needs some good syntax to cover all posible options, for example:
docker.info[DriverStatus,*]
- returns whole list as a plain text
docker.info[DriverStatus,="Pool Blocksize"]
- returns item from the list, which contains "Pool Blocksize" key
docker.info[DriverStatus,2]
- returns 2nd item from the list
...
Feel free to create pull request for that. You need to modify https://github.com/monitoringartist/zabbix-docker-monitoring/blob/0dd6cde8a4007593d555eef3e6e9f8639485d59d/src/modules/zabbix_module_docker/zabbix_module_docker.c#L1850-L1861
In the theory you can use Zabbix 3.4+ and JSON preprocessing to parse that values. That's also concept of https://github.com/monitoringartist/zabbix-docker-monitoring-ng
I'm using ECS optmized AMI to run docker containers and this AMI uses devicemapper driver for Docker storage laying on LVM. How could I use docker.info to get/parse the bellow metrics? I've tried docker.info[DriverStatus] but it returned
ZBX_NOTSUPPORTED: Cannot find the [DriverStatus] item in the received JSON object
.