We would like to do disk space alerting based on the size of a disk. I noticed cdm probe can now collect disk size which is great. How can we use that information so that we can apply different thresholds for different disk size in an automated manner (possibly using MCS)?
For disk size:
The reason we need this is because 5% free on 50 GB disk is much different than 5% free on 2 TB disk. So, the existing options of using either % or MB free will not work. We need to use some combination of multiple metrics like disk size and disk free to do effective disk monitoring.
Let me know if anyone has any idea or done something similar.
Hello Ankur, in addition you may consider to raise an idea in the community for this requirement so that PM can review it and consider for a future release.
I'll vote up your idea - I've had similar questions in the past and haven't come across a good solution. I've resorted to manually setting thresholds based on a range of disk sizes. So far its working ok, but its not an ideal solution.
It seems that MCS does not have option to set alarm for Disk Usage warning based on disk size(MB).
You may try to use cdm super package as per the article below.
How to enable cdm to automatically monitor new disks
You need to change as below.
<disk> <fixed_default> active = yes percent = no..
<error> active = yes threshold = 1000
Note: the value of threshold is in MB.
Specifying a percentage that varies by the size of the disk is very close to setting a fixed amount as one of the posters noted. It would probably achieve your goals if not exactly fit your problem description.
An alternative to this is to write a LUA script that you run periodically to correct the CDM thresholds. You're looking for information on running the controller callback probe_config_get and probe_config_set. You can get the disk sizes via the CDM callback disk_status.
Yes, I have already opened an idea too: Intelligent Disk Space Alerting
Please vote up for the idea if you like it too. In the meantime, I was looking if someone was able to implement something similar already.
Thanks for your comment. Not exactly what I am looking for. I would like to apply different thresholds based on the size of a particular disk. For example, if the disk size is 50 GB, I would like to have 15% free threshold, but if the disk size is 1 TB, then 5% free threshold.