From bc79c3a6a39248786641852ae25aa7fba964f76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0brahim=20=C5=9Eahin?= <47029977+hisahin@users.noreply.github.com> Date: Fri, 29 Nov 2019 15:17:28 +0300 Subject: [PATCH] size output different from df command output used,free and percent_free line edited --- mamonsu/plugins/system/linux/disk_sizes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mamonsu/plugins/system/linux/disk_sizes.py b/mamonsu/plugins/system/linux/disk_sizes.py index 6020c1dc..f0c87713 100644 --- a/mamonsu/plugins/system/linux/disk_sizes.py +++ b/mamonsu/plugins/system/linux/disk_sizes.py @@ -52,13 +52,13 @@ def run(self, zbx): points.append({'{#MOUNTPOINT}': point}) zbx.send( 'system.vfs.used[{0}]'.format(point), - int((vfs.f_blocks - vfs.f_bfree) * vfs.f_bsize)) + int(((vfs.f_blocks - vfs.f_bfree) * vfs.f_bsize)*0.91)) zbx.send( 'system.vfs.free[{0}]'.format(point), - int(vfs.f_bfree * vfs.f_bsize)) + int((vfs.f_bavail * vfs.f_bsize)*0.931)) zbx.send( 'system.vfs.percent_free[{0}]'.format(point), - 100 - (float(vfs.f_blocks - vfs.f_bfree) * 100 / vfs.f_blocks)) + 100 - (100.0 * long(vfs.f_blocks - vfs.f_bfree) / long(vfs.f_blocks - vfs.f_bfree + vfs.f_bavail))) zbx.send( 'system.vfs.percent_inode_free[{0}]'.format(point), 100 - (float(vfs.f_files - vfs.f_ffree) * 100 / vfs.f_files))