CDM probe is giving wrong values in percentage.
We are monitoring servers and created a custom alarm for alarming free space values. In our case, we have added the $free_gb variable to the CpuError default message.
The issue does not occur all the time.
Example 1:
So:
(152.9*100)/1025.9= 14.90 % --> but showing 17.61%
(187.7*100)/1025.9= 18.29 % --> but showing 17.61%
We are seeing a discrepancy between the value of $free_gb in comparison to the actual free space observed in the probe GUI and in the DiskManagement in the server and the same default "Disk Usage (%)" printed in the same message.
Example 2:
On one interval: --> 15.5GB shows 13.63%
But on another interval, --> 15.5GB is also showing 15.50%
Why is this happening and why can we fix this?
Configuration issue
The alarm of concern is a customized alarm, and it is adding an additional value to the out-of-the-box alarm. The out-of-the-box alarm works fine, while only the customized alarm presents this discrepancy in the below scenario.
Original out-of-the-box alarm for Disk Error:
Average ($value_number samples) disk free on $drive is now $value$unit, which is <= error threshold ($value_limit$unit) out of total size $size_gb GB
Modified Alarm:
Hi Team , Disk free on $drive is now $free_gb GB ($value$unit), which is <= threshold ($value_limit$unit) out of total size $size_gb GB. Kindly take an action ASAP
So you have added a value ($free_gb)
If you used the basic alarm you would NOT see this issue.
Why is this happening:
This disk monitor "Disk Usage (%)", is designed to monitor the disk usage, in percentage, issues its value ($value$unit) - where $value = the disk usage $unit=% and not the ($free_gb)
THE VALUE ($value$unit) which is the value that is used for the threshold calculation always corresponds to the disk Management Disk Usage (% Free) you can see in the disk management at the moment of the alarm.
When you add ($free_gb) which is a different value this depends on the Control Properties
So essentially the reason why the values are "wrong" is because there is a discrepancy between the $free_gb (taken every average determined by the controller prproperties VS the free % (taken every poll).
0 means default. Default is 5.
so
Samples = 0 means samples = 5.
For this alarm to be always matching the 2 values ($free_gb and free % ) please set samples = 1.
This will mean that every 30 minutes you capture a value that is then stored in the DB and printed in the Alarm. After this, the values should match.