Trying to monitor a large filesystem returns ZBX_NOTSUPPORTED.
- zabbix_agentd -t vfs.fs.size[/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274,pfree]
vfs.fs.size[] [m|ZBX_NOTSUPPORTED]
From df -h:
znfs-5007.fs.xxxx.xxx.xx:/storage/ZNFS-5007/280465a6-b940-5cf9-f9b0-141b5090f274
7.0T 453G 6.5T 7% /var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274
Stracing it, we see that statfs() gets EOVERFLOW:
statfs("/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274", 0xbfe206ec) = -1 EOVERFLOW (Value too large for defined data type)
The solution i found was to recompile the client using this:
- CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" ./configure --enable-agent
Then it works fine, because it uses statvfs64():
- ./zabbix_agentd -t vfs.fs.size[/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274,pfree]
vfs.fs.size[] [d|93.608536]
From strace:
stat64("/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274",
{st_mode=S_IFDIR|0755, st_size=249, ...}) = 0
I've been playing with zabbix-1.8.3/src/libs/zbxsysinfo/linux/diskspace.c, changing from statvfs/statfs to statvfs64/statfs64, but got into problems compiling and maybe it's not the better way to do this.
On 32 or 64 bits archs, zabbix_agentd uses statfs/statvfs and should use statfs64/statvfs64, so people with big file systems don't get ZBX_NOTSUPPORTED.