[ZBX-25199] Bad disk space calc due to type conversion in Linux by SNMP Created: 2024 Sep 09 Updated: 2025 May 29 Resolved: 2024 Sep 29 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Templates (T) |
| Affects Version/s: | 7.0.3 |
| Fix Version/s: | 7.0.5rc1, 7.2.0alpha1 |
| Type: | Problem report | Priority: | Major |
| Reporter: | Dennis Skinner | Assignee: | Denis Rasikhov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Team: | |||||
| Story Points: | 1 | ||||
| Description |
|
For Preprocessing on Item Prototypes Space: Available, Total, Used and Used in % if the value returned from JSON is large enough, Javascript doesn't handle the type conversion properly and the returned value ends up being in ZB instead of TB. Parsing the values as Int and Float seems to resolve the issue: var portionHigh = 4294967296; var obj = JSON.parse(value); var dskTotalHigh = parseInt(obj['dskTotalHigh'], 10), dskTotalLow = parseFloat(obj['dskTotalLow']); return (dskTotalHigh * portionHigh + dskTotalLow) * 1024;
{#SNMPINDEX}":"30","dskEntry":"30","dskPercentNode":"0","dskTotalLow":"1763059968","dskTotalHigh":"3","dskAvailLow":"360840500","dskAvailHigh":"1","dskUsedLow":"1402219468","dskUsedHigh":"2"}
|
| Comments |
| Comment by Dennis Skinner [ 2024 Sep 09 ] |
|
Sorry, should have mentioned this is in the Item Prototypes for: "SNMP walk mounted filesystems: Mounted filesystem discovery" in the Linux by SNMP. |
| Comment by Denis Rasikhov (Inactive) [ 2024 Sep 27 ] |
|
Fixed in:
|