[ZBX-10183] vfs.fs.size not able to calculate very large partitions Created: 2015 Dec 21 Updated: 2017 May 30 Resolved: 2016 Jan 18 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 2.2.11 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Sorin Gheorghiu | Assignee: | Unassigned |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Ubuntu 12.04.5 |
Issue Links: |
|
Description |
Attempting to monitor a very large partition: # df -h /srv/ams/media Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_kimstream02_data-lv_data 2,0T 1,4T 516G 74% /srv/ams/media or in bytes: # df -B1 /srv/ams/media Filesystem 1B-blocks Used Available Use% Mounted on /dev/mapper/vg_kimstream02_data-lv_data 2164338376704 1500130099200 554259423232 74% but the request from the Zabbix server fails: # zabbix_get -s xxx.xxx.xxx.xxx -k vfs.fs.size[/srv/ams/media,pfree] ZBX_NOTSUPPORTED The Item's 'Data type' is set to Integer and 'Units' is set to B (byte). According to Zabbix documentation a Numeric (unsigned) is a 64bit unsigned integer, therefore 2^64 (18,446,744,073,709,551,616) is larger than 1,500,130,099,200. Why does Zabbix fail in this case to return the partition size? |
Comments |
Comment by Aleksandrs Saveljevs [ 2015 Dec 22 ] |
Is that filesystem an LVM logical volume? Would it be possible to try Zabbix 2.4 agent and try executing the following command: # zabbix_agentd -t vfs.fs.size[/srv/ams/media,pfree] Zabbix 2.4 agent implements error messages for not supported items, this is what we are looking for. |
Comment by Oleksii Zagorskyi [ 2015 Dec 22 ] |
As we see, actual mount point is /dev/mapper/vg_kimstream02_data-lv_data, which had to used in the key parameter. Closed as won't fix. |
Comment by Sorin Gheorghiu [ 2015 Dec 22 ] |
I don't agree with closure without confirmation the issue is resolved or tested by yourself. Monitoring the mount point as suggested will reflect a different issue, the agent will return 1,525,473,280 which is not equal to 1,500,500,652,032 # df -B1 /dev/mapper/vg_kimstream02_data-lv_data Filesystem 1B-blocks Used Available Use% Mounted on /dev/mapper/vg_kimstream02_data-lv_data 2164338376704 1500500652032 553888870400 74% /srv/ams/media # zabbix_get -s xxx.xxx.xxx.xxx -k vfs.fs.size[/dev/mapper/vg_kimstream02_data-lv_data,free] 1525473280 Anyway the agent should be able to read the size of /srv/ams/media 'Template OS Linux' has automatically discovered all partitions of this server. They are created with logical volumes and the problem occurs with the large partition only (1 of 7), all other 6 partitions can be monitored:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_kimstream02-lv_root
16G 2,2G 13G 16% /
tmpfs 1,5G 72K 1,5G 1% /dev/shm
/dev/sda1 477M 139M 313M 31% /boot
/dev/mapper/vg_kimstream02-lv_home
16G 41M 15G 1% /home
/dev/mapper/vg_kimstream02-lv_opt
16G 493M 14G 4% /opt
/dev/mapper/vg_kimstream02-lv_tmp
7,6G 22M 7,2G 1% /tmp
/dev/mapper/vg_kimstream02-lv_usr
16G 3,3G 12G 23% /usr
/dev/mapper/vg_kimstream02-lv_var
16G 284M 15G 2% /var
/dev/mapper/vg_kimstream02_data-lv_data
2,0T 1,4T 516G 74% /srv/ams/media
For example the agent returns the size for the /opt partition as expected: # df -h /opt Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_kimstream02-lv_opt 16G 493M 14G 4% /opt # zabbix_get -s xxx.xxx.xxx.xxx -k vfs.fs.size[/opt,free] 15024648192 |
Comment by Sorin Gheorghiu [ 2015 Dec 22 ] |
The agent returns for /opt the exact size of free space 15,024,648,192: # df -B1 /dev/mapper/vg_kimstream02-lv_opt Filesystem 1B-blocks Used Available Use% Mounted on /dev/mapper/vg_kimstream02-lv_opt 16379748352 516239360 15024648192 4% /opt # zabbix_get -s xxx.xxx.xxx.xxx -k vfs.fs.size[/opt,free] 15024648192 |
Comment by Oleksii Zagorskyi [ 2015 Dec 22 ] |
Heh, I don't know how that could happen, but I was wrong, I'm sorry. And now I'm getting surprised that block devices for vfs.fs.size return some values # df -B1 / Filesystem 1B-blocks Used Available Use% Mounted on /dev/sda2 196568788992 186131685376 10437103616 95% / # zabbix_get -s localhost -k vfs.fs.size[/,free] 10437103616 # zabbix_get -s localhost -k vfs.fs.size[/,used] 186131685376 # zabbix_get -s localhost -k vfs.fs.size[/dev/sda2,free] 10485760 # zabbix_get -s localhost -k vfs.fs.size[/dev/sda2,used] 0 Well, as Aleksandrs Saveljevs requested, please test recent agent version 2.4.7 |
Comment by Sorin Gheorghiu [ 2015 Dec 23 ] |
No problem, I am happy that you could reproduce one issue. I am going to test with agent version 2.4.7 if required, but after mid January. Would an agent 2.4 work with server 2.2? |
Comment by Oleksii Zagorskyi [ 2015 Dec 23 ] |
yes, agent 2.4 is absolutely compatible with lower zabbix server/proxy. I don't think that partition size does the key matter, probably something else. Sorin, check please also first Aleksandrs Saveljevs' comment and do exactly what was requested (zabbix_agentd -t ....), as in such a way the check performed under a shell user, for example root. |
Comment by Aleksandrs Saveljevs [ 2015 Dec 23 ] |
Just a note that, while probably true, using a newer agent with an older server/proxy is not officially supported. Using an older agent with a newer server/proxy is. |
Comment by Sorin Gheorghiu [ 2016 Jan 18 ] |
The problem is reproducible in 2.4 with the following error:
After the permissions for 'zabbix' user were changed request returned the expected values:
The problem is solved, the error messages from 2.4 helped to isolate the issue as suggested. Thank you! — As regards your ticket |
Comment by Sorin Gheorghiu [ 2016 Jan 18 ] |
Do you recommend to use Zabbix 2.2 or 2.4? |
Comment by Oleksii Zagorskyi [ 2016 Jan 18 ] |
hmm. 2.4 provides more details in case if item is not supported, so it's better. I'm closing this issue as cannot reproduce. |