Ad Widget

Collapse

Wrong file system metric units

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hioctane
    Junior Member
    • Sep 2009
    • 4

    #1

    Wrong file system metric units

    Hi,

    I'm running Zabbix agentd 1.6.6 on FreeBSD 5.x, 6.x and 7.x and the file system units are incremented which caused MB to show GB, GB to show TB etc...
    The Zabbix agentd 1.4.4 shows the correct unit on FreeBSD but it's lacking the cpu.util trigger, so it's not good for me either.

    The 1.6.6 agent works fine and shows the correct unit on Ubuntu.

    Can someone help?


    Thanks
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    you should be able to use multiplier to convert incoming whatever-scale-data to bytes, which should produce correct results everywhere else
    Zabbix 3.0 Network Monitoring book

    Comment

    • hioctane
      Junior Member
      • Sep 2009
      • 4

      #3
      I guess I'll have to set the multiplier for the FreeBSD template and leave the Linux one alone.

      Thank you for your reply

      Comment

      • auro
        Junior Member
        • Sep 2009
        • 29

        #4
        Solved!!!

        Hi guys!

        Me and a friend of mine have figured out what is wrong with FreeBSD agent free size report.

        On line 47 of zabbix-1.6.6/src/libs/zbxsysinfo/freebsd/diskspace.c file, just change

        *free = (zbx_uint64_t)s.f_bfree * s.f_frsize;

        to

        *free = (zbx_uint64_t)s.f_bavail * s.f_frsize;

        Recompile, deinstall, install and its done.

        Using FreeBSD 6.2.

        Thanks to ChaosMaker

        Comment

        Working...