Ad Widget

Collapse

Bug in Agent 1.8.2 with disk size (vfs.fs.size)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prote
    Junior Member
    • Dec 2008
    • 16

    #1

    Bug in Agent 1.8.2 with disk size (vfs.fs.size)

    Some days ago I had problems with Custom multiplier and Network Traffic but I doesn't waste time to test and I removed the Custom multiplier. Today I observed that some of my servers have PB (PetaByte-Disks) or Disks with some hundreds of TB - but I'm sure they don't have

    Exactly the trigger on
    vfs.fs.size[/,total]
    uses in my template a Custom multiplier of 1024 and Units "B". Some dozens of Linux-Servers with Agent-versions 1.4.6 or 1.6.1 show the right size but every Server with an 1.8.2-Agent shows 1024 (or 1000?) times to much total disk space. I don't know if the problem is the multiplier itself or the response from the client.
    An example:
    zabbix_get -s1.2.3.4 -p10050 -k"vfs.fs.size[/,total]"
    1486071214080
    That are with Custom Multiplier 1.35 PB but the right size of this disc is 1.4 TB. Can anyone put this on bugtracker please?

    Edit: server is Zabbix 1.8.2 on Debian Squeeze
    Last edited by prote; 22-12-2010, 14:07.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    zabbix agent starting with version 1.8 returns bytes on all platforms - before that it was slightly inconsistent and returned bytes on some and kb on others
    Zabbix 3.0 Network Monitoring book

    Comment

    • prote
      Junior Member
      • Dec 2008
      • 16

      #3
      Ihh .. ohh ... mhhh ... ok ^^ Thx That's a little bit ugly if you have many different systems. I have most servers on Debian stable but some are with testing/unstable-Packages or with Ubuntu and on a Debian-system I hate it to use packages which are not in the official mirrors. The Winmachines are not a problem for me, they are all with v1.8.2.
      Is there a workaround to adjust the values on serverside? It has to DIV/MUL the response in dependence of the value of "zabbix_agentd -V"

      Edit: ok, I decided to install the 1.8.2 on all monitored servers ... puh ... Here are the lines you need to copy the files from an 1.8.2-debian-host to an other:
      # cd /var/cache/apt/archives/
      # rsync -ahv 1.2.3.4:/var/cache/apt/archives/zabbix-agent_1%3a1.8.2-1squeeze1_amd64.deb .
      # rsync -ahv 1.2.3.4:/var/cache/apt/archives/libopenipmi0_2.0.16-1_amd64.deb .
      # dpkg -i zabbix-agent_1%3a1.8.2-1squeeze1_amd64.deb libopenipmi0_2.0.16-1_amd64.deb
      Not nice but it works. I should only remember about this if there are new versions avaliable cause apt holds them now on 1.8.2
      Last edited by prote; 22-12-2010, 18:01.

      Comment

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

        #4
        well, you could use two different templates depending on agent version and use multiplier only for older agent. not that nice as well...
        Zabbix 3.0 Network Monitoring book

        Comment

        • qix
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2006
          • 423

          #5
          Perhaps setup a small (internal) apt system of your own with your current version for the agent? It's basically just a little website that you add to your sources.list files on your client servers. You might want to build your own packages with a slightly different name to prevent conflicts.

          You could then release a new agent when you are ready for rollout to your servers.

          Now to find a way to port APT to windows
          With kind regards,

          Raymond

          Comment

          • boy01
            Junior Member
            • Dec 2007
            • 24

            #6
            Originally posted by richlv
            well, you could use two different templates depending on agent version and use multiplier only for older agent. not that nice as well...
            Don't want to do that, so here's the patch for linux hosts (zabbix v1.8.4):

            Code:
            $ diff -uN src/libs/zbxsysinfo/linux/diskspace.c.ORIG src/libs/zbxsysinfo/linux/diskspace.c
            --- src/libs/zbxsysinfo/linux/diskspace.c.ORIG  2011-01-04 15:57:50.000000000 +0200
            +++ src/libs/zbxsysinfo/linux/diskspace.c       2011-01-28 10:49:46.000000000 +0200
            @@ -38,11 +38,11 @@
                            return SYSINFO_RET_FAIL;
            
                    if (total)
            -               *total = (zbx_uint64_t)s.f_blocks * s.ZBX_BSIZE;
            +               *total = (zbx_uint64_t)(s.f_blocks * (s.ZBX_BSIZE/1024.0));
                    if (free)
            -               *free = (zbx_uint64_t)s.f_bavail * s.ZBX_BSIZE;
            +               *free = (zbx_uint64_t)(s.f_bavail * (s.ZBX_BSIZE/1024.0));
                    if (used)
            -               *used = (zbx_uint64_t)(s.f_blocks - s.f_bfree) * s.ZBX_BSIZE;
            +               *used = (zbx_uint64_t)((s.f_blocks - s.f_bfree) * (s.ZBX_BSIZE/1024.0));
                    if (pfree)
                    {
                            if (0 != s.f_blocks - s.f_bfree + s.f_bavail)

            Comment

            Working...