-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 7.0.25
-
Component/s: API (A), Frontend (F), Proxy (P), Server (S)
Description:
With numeric items you have to set the datatype ("Type of information") to "unsigned" or "float". Sometimes this has to be changed for some reason, which is generally possible. But then all historic values are lost. Latest data as well as the graphs are only showing values of the current datatype.
When looking into the database the values of the former datatype are still there. If you change it back to the former one the data retrieved for the new datatype is missing but all older ones are shown.
This shows that Zabbix just doesn't use them which doesn't make much sense in my opinion.
Steps to reproduce:
- Create an item of datatype "Numeric (unsigned)"
- Wait until some values have been collected
- Change the item's datatype to "Numeric (float)"
- Wait again until some values have been collected
- Looking into the latest values there will only be float values.
- Change the item's datatype back to "Numeric (unsigned)"
- Looking into the latest values there will be no float values but the old unsigned integer values.
Solution:
It would be much better if Zabbix wouldn't distinguish between the datatype and use all available values instead. I don't think this would lead to any significant performance problems since the database engine can do the magic. It just needs to look into both tables and merge the results accordingly.
Therefore it should also be quite easy to implement the required changes in Zabbix.
if you're worried that it might cause problems after all, you could also provide a configuration option to choose between both behaviors. So it would be the Zabbix admin's responsibility to decide which one to use.
Of course this change would also apply to the item trends values.