PDA

View Full Version : Inverse multipliers?


Hichhiker
17-08-2005, 23:27
Is it possible to add inverse multipliers (i.e. divide data before storing instead of multiplying)?

Using 1.1a10 (in case this was added to alpha11+)

Thanks

-HH

James Wells
17-08-2005, 23:32
Greetings,

Yes, please add this feature... And if you add divisors, please do not auto calculate a postfix for it. ;) This will make it very nice for things like uptime, which returns in seconds and needs to be divided by 86400 to get days. :)

jpawlowski
18-08-2005, 09:41
no problem, just use 0.xxxx as multiplier and you actually have a devision :-)

Hichhiker
18-08-2005, 16:52
no problem, just use 0.xxxx as multiplier and you actually have a devision :-)

That would be nice and is in fact the first thing I looked at, but the multiplier is stored as an integer and I doubt that simply changing the column in the DB will not cause issues elsewhere in code, which expects an integer. I guess I should trace the coded and find where and how multiplier is used :-) I fixed 1.0 release, but that was easy, since multiplier was a power of 2, and I could just add negative numbers to UI. 1.1 UI is a bit different.

Before I go digging, Anyone know if multiplier value used at all in the zabbix_server binary or is it purely used during presentation by the front end?

Thanks,

-HH

jpawlowski
19-08-2005, 08:13
be aware of the dot in my number so that _is_ an integer :-)
for example 0.01 if you would like to have 12,58 instead of 1258...
i use it and it works fine!

Alexei
19-08-2005, 08:35
Note that ZABBIX 1.0 does not support custom multipliers.

Hichhiker
19-08-2005, 17:57
be aware of the dot in my number so that _is_ an integer :-)
for example 0.01 if you would like to have 12,58 instead of 1258...
i use it and it works fine!

:confused: We are obviously working from a different definition of an integer. I always believed an integer to be a "positive or negative number that does not include a fraction or decimal". But if you say it works, I shall give it a try. :)

Thanks.

-HH

Hichhiker
19-08-2005, 18:21
Note that ZABBIX 1.0 does not support custom multipliers.

Actually, it *sort of* did - if you edit the items form in config php files to include negative powers it will store the value in DB. Not fully custom, but if you want to stick to powers of 2 (well, of 1024 actually), it was very handy to divide as well as to multiply. :) I am still using this in 1.0 install we have. I want to upgrade to 1.1aplha though, as it looks much nicer, but need to resolve this issue first.

-HH