[ZBX-1531] Misuse of multiplier in items for counting total, free, used volume space withing several templates for various OSes. Created: 2009 Dec 14  Updated: 2017 May 30  Resolved: 2011 Aug 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Server (S)
Affects Version/s: 1.6.6, 1.8
Fix Version/s: None

Type: Incident report Priority: Critical
Reporter: Alexander Afonyashin Assignee: Unassigned
Resolution: Duplicate Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux CentOS 5.3 i686


Issue Links:
Duplicate
duplicates ZBX-2348 agent compatibility flag for 1.6 Closed
is duplicated by ZBX-1965 zabbix_agentd 1.8.1 compiled on sles ... Closed

 Description   

It seems that the following items from templates for various OSes that comes with Zabbix 1.6.6 distro are broken:

  • Total disk space on $1
  • Total disk space on $1
  • Used disk space on $1

where $1 stands for (/, /var, /usr, /home, /opt) at least for Template_FreeBSD, Template_Linux, Template_MacOS_X ...

The problem is as follows. They all use non-zero 'Custom multiplier' (equals to 1024) for storing bytes' counter of filesystems. When both Zabbix server and agents versions were 1.6.6 all displays fine (even with this strange multiplier). Values were accurated and close to reality.

A few days ago I've updated Zabbix server to 1.8 version. Agents were still 1.6.6. Values continued to be accurate. Today I've updated agents to version 1.8 too. Shortly later I found that there're misses in collected data. Moreover, Zabbix server began has started to crash. /tmp/zabbix_server.log filled with errors like:

22697:20091214:171041.198 [Z3005] Query failed: [0] PGRES_FATAL_ERROR:ERROR: numeric field overflow
DETAIL: A field with precision 16, scale 4 must round to an absolute value less than 10^12.
[insert into history (itemid,clock,value) values (22794,1260799834,915.458333);
insert into history (itemid,clock,value) values (22569,1260799834,281045.958333);
[skipped]
insert into history_uint (itemid,clock,value) values (23135,1260799837,247813816451072);
insert into history_uint (itemid,clock,value) values (22506,1260799837,2695972782080);

At the same time values displayed in Zabbix frontend were like:

2009.Dec.14 17:13:18 2.4781549417267E+14
2009.Dec.14 17:11:48 2.4781516701696E+14

Used volume size was around 226Gb, so there is amisuse of 1024 'Custom multipler' for counting bytes in templates. I don't no why it worked in 1.6.6.

Once again, Zabbix server 1.6.6 + Zabbix agent 1.6.6 work normal. Zabbix server 1.8 + Zabbix agent 1.6.6 work normal too. But Zabbix server 1.8 + Zabbix agent 1.8 work abnormal if using templates from Zabbix 1.6.6 server (keeped after upgrade 1.6.6->1.8).

Solution: update templates for volume total, free, used spaces by removing custom multiplier. Need to check if it would broke 1.6.6.



 Comments   
Comment by Daniel Santos [ 2009 Dec 23 ]

I can confirm this bug with the same scenario here... Upgraded my server from 1.6.7 -> 1.8 and all agents remained in 1.6.7.
When I upgraded one of my agents to 1.8 this bug showed up.

I did some research and done an ALTER TABLE on table history, field VALUE and changed from numeric(16,4) to numeric(20,4). The errors that was appearing in the log "[Z3005] Query failed: [0] PGRES_FATAL_ERROR:ERROR: numeric field overflow" just disappeared, but counter of filesystem stays the same... showing TB instead of GB.

My Environment: Ubuntu Server 9.04 i386 with PostgreSQL 8.4.

I will try to change templates has stated by Alexander and post results here.

Comment by richlv [ 2009 Dec 23 ]

looks like byte values overflow field sizes too easily

Comment by Daniel Santos [ 2009 Dec 23 ]

Ok, just to confirm that disabling Multiplier for vfs.fs.size itens on templates fixed the problem for 1.8 agents, but breaks 1.6.x agents. But I had to manually change history table definition from numeric(16,4) to numeric(20,4).

I'll upgrade all my agents to 1.8.

Comment by Daniel Santos [ 2009 Dec 23 ]

I just ran this query in my DB to disable multiplier on all items related to vfs.fs.size, as this item does not need Multiplier enabled anymore.

If this is wrong, please, let me know.

First I do a select to check how many entries I get.

SELECT key_, multiplier
FROM items
WHERE key_ LIKE '%vfs.fs.size%';

Then I run the update.

UPDATE items SET multiplier = 0 WHERE key_ LIKE '%vfs.fs.size%';

Comment by Luc Willems [ 2010 Feb 01 ]

have same issue with mixed agent versions.
id did a clean install of 1.8 -> upgraded to 1.8.1 .
auto discover running agents on my localnetwork (most running 1.6.5, some older 1.4.4 versions)

when looking at the disk information of linux hosts, if noticed that the returned result was "to low", meaning 8GB disk was returned as 8MB disk (total size)

checked with new system , using 1.8 agent , this value was correct.
testing on 2 system (both have a 8GB / partition) :

root@LUMA139:~# telnet 10.1.1.145 10050
Trying 10.1.1.145...
Connected to 10.1.1.145.
Escape character is '^]'.
vfs.fs.size[/,total]
ZBXD7753836Connection closed by foreign host.
root@LUMA139:~# telnet 10.1.1.145 10050
Trying 10.1.1.145...
Connected to 10.1.1.145.
Escape character is '^]'.
agent.version
ZBXD1.6.4Connection closed by foreign host.

root@LUMA139:~# telnet 10.1.1.149 10050
Trying 10.1.1.149...
Connected to 10.1.1.149.
Escape character is '^]'.
vfs.fs.size[/,total]
ZBXD
7939928064Connection closed by foreign host.
root@LUMA139:~# telnet 10.1.1.149 10050
Trying 10.1.1.149...
Connected to 10.1.1.149.
Escape character is '^]'.
agent.version
ZBXD1.8Connection closed by foreign host.

Notice that 1.6.4 agent returns Kbytes instead of bytes. Our old zabbix server uses a multiblier of 1024 in the linux template , new server doesn't have this.

Comment by Alixen [ 2010 Feb 24 ]

This difference between agent data in 1.6 and 1.8 is a big problem for us.
We monitor hosts located at several remote locations and we cannot update all agents on all hosts at the same time.
Since we rely on templates to monitor disk space, as soon as we upgrade some hosts, we will get wrong values for these new hosts and, if we change disk space multiplier in template, data will be wrong for old ones.

Our current policy is to install 1.6 agent on any new server until this problem is solved.
As this cannot be a long term solution, we hope that this regression in Zabbix agent will be corrected.

Regards,
Alixen

Comment by richlv [ 2011 Aug 29 ]

implementing a compatibility mode for agent seems to be the best solution currently, so if anybody needs this, pushing for ZBX-2348 might work...

Generated at Fri May 16 08:02:43 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.