Incorrect values in all checks after updating to 2.13.1

After updating to 2.13.1 all disk checks, memory checks, load checks dropped about 10%. It doesn’t matter whether it’s a linux or windows system. It seems to be a problem on interpreting the perfdata. A disk which has 80 GB shows in Grafana only as 72 GB and also all thresholds.

Before updating we ran version 2.12.5. Has there something been changed what could cause this? In the Changelog I couldn’t find an answer to this.

Kind regards

2.13 introduced support for new units of measurement: Service Monitoring - Icinga 2

So it is likely that disk and memory checks have now changed if something was using the incorrect conversion (GB vs. GiB), but changed values for load will have another reason.

Monitoring plugins report sizes as powers of 2. The default unit for check_disk is megabytes, so if icinga started dividing that by 1048576 for the second time then it will simply show wrong values.

# /usr/local/libexec/nagios/check_disk -w 80% -c 90% -u bytes /
DISK CRITICAL - free space: / 4845006848 B (25% inode=93%);| /=14286000128B;-2147483648;2079456870;0;20794568704
# /usr/local/libexec/nagios/check_disk -w 80% -c 90% /
DISK CRITICAL - free space: / 4620 MB (25% inode=93%);| /=13624MB;3966;1983;0;19831

Yes, but in this case, the monitoring plugin would be wrong as powers of 2 are not MB but MiB. The nagios plugins fixed this a while ago (2.3.0) and changed later the default (2.3.2). For the monitoring plugins a issue is open from 2017 about a mismatch here.

The monitoring plugins spec comes from mid-1990s when the “MiB” nonsense hadn’t been invented yet. A lot of accompanying software follows this.

The obvious solution is to always use --unit bytes (or equivalent for different plugins) to work around the confusion. I’d suggest adding a bold notice in the documentation.