On x86 / armv7 / armhf, the go agent2 fails to build:
# zabbix.com/plugins/proc
plugins/proc/procfs_linux.go:248:6: constant 1099511627776 overflows int
strconv.Atoi returns an integer, which is 32-bits on 32-bits systems.
Something like this fixes it:
- v, err := strconv.Atoi(strings.TrimSpace(line[:len(line)-2])) + val, err := strconv.Atoi(strings.TrimSpace(line[:len(line)-2])) if err != nil { return 0, false, err } + v := int64(val)