The local filesystem plugin calls statfs to collect metrics. AvailableSpace is calculated using the f_bavail field from the statfs struct whereas AvailableSpacePercentage is calculated based off of the f_bfree field. These metrics should be consistent in which field they base their calculation.
long f_bfree; /* free blocks in fs */
long f_bavail; /* free blocks avail to non-superuser */
Ideally, the plugin should be extended to report the free space available to non-superuser vs superuser, but that is left to be dealt with by a future feature.
Patch attached
Pushed to git tree
[3835ad]
Related
Commit: [3835ad]