[ZBX-9519] vfs.fs.inode[/path,pfree] for CephFS Created: 2015 Apr 24  Updated: 2017 May 30  Resolved: 2015 Aug 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.4.5
Fix Version/s: 2.5.0

Type: Incident report Priority: Trivial
Reporter: Ilia Slepnev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: inodes, items
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora 21, CentOS 6.6



 Description   

Mounted CephFS filesystem does not report used and free inode count. Zabbix agent is confused and prints invalid numbers (2.34e+15). It should be ZBX_NOTSUPPORTED.

  1. zabbix_agentd -t 'vfs.fs.inode[/mnt,pused]'
    vfs.fs.inode[/mnt/ceph,pused] [d|-2344083806410423.500000]
  1. zabbix_agentd -t 'vfs.fs.inode[/mnt,pfree]'
    vfs.fs.inode[/mnt,pfree] [d|2344083806410523.500000]
  1. df -i
    Filesystem Inodes IUsed IFree IUse% Mounted on
    ceph-mon:/ 786949 - - - /mnt


 Comments   
Comment by Andris Mednis [ 2015 Jul 10 ]

It could be interesting to test do log file monitoring with log[] and logrt[] items work on CephFS because their algorithms rely heavily on inodes.

Comment by Glebs Ivanovskis (Inactive) [ 2015 Jul 15 ]

Unfortunately, implementation of functions statfs()/statvfs() we rely on in vfs.fs.inode[] depends heavily on filesystem. Very little is said in POSIX about how these functions should fill corresponding statfs/statvfs structures. Some useful information can be found here:
http://www.qnx.com/developers/docs/660/index.jsp?topic=%2Fcom.qnx.doc.neutrino.lib_ref%2Ftopic%2Fs%2Fstatvfs.html
https://www.mkssoftware.com/docs/man5/struct_statvfs.5.asp

In case of CephFS a value of 2^64-1 is returned in f_ffree/f_favail. We can easily provide fix for CephFS, but there is no guarantee that CephFS will not change its behaviour in the future.

We should probably look for a more general solution taking into account related issues such as ZBX-2966.

Comment by Glebs Ivanovskis (Inactive) [ 2015 Jul 21 ]

Fix for 2.5.0 (trunk) is available in development branch svn://svn.zabbix.com/branches/dev/ZBX-9519 in revision 54480.

On Linux 'vfs.fs.inode[]' now outputs the same as 'df -i' or returns error message if not possible. Similar fix may be applied to other platforms if needed.

Comment by dimir [ 2015 Aug 04 ]

Successfully tested. Please review my small change in r54668 .

Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 12 ]

Fixed in pre-2.5.0 (trunk) r54878.

Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 14 ]

Mentioned change in vfs.fs.inode[] behaviour on CephFS:
https://www.zabbix.com/documentation/3.0/manual/introduction/whatsnew300?&#item_changesimprovements

sasha CLOSED

Generated at Tue Jul 08 00:20:10 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.