9 years ago
Alert floor in delta
I have a datasource that monitors disk usage spikes. Currently it is set to alert if there is a change in disk usage greater than 10% in 10 minutes (polling period). It is useful to know if disk us...
Hi again Daniel,
I spent a bit more time on this and additionally you could create a groovy scripted complex datapoint to handle the custom token or its absence.
1. Create a complex datapoint in your datasource (or a clone of the datasource, during development), named e.g. deltaFloor
2. For this datapoint, select the method as "Use groovy script to calculate a value".
3. In the "Groovy source code" field, use this script (where 70 is the value above which you're interested in delta alerts):
if ('##DELTAFLOOR##' == '') {return 70} else {return ##DELTAFLOOR##}
4. Save the datapoint.
5. Create another complex datapoint, named e.g. deltaFloorPercentUsed
6. Using the "Use an expression..." method, use this expression:
if(ge(PercentUsed,deltaFloor),PercentUsed,deltaFloor)
7. Set your desired alerting on this latter datapoint.
In this way, if the device has a ##DELTAFLOOR## property set, that value will be used, otherwise the value of 70 will be used; Then where the PercentUsed value for the disk in question is above the deltaFloor, your delta alerting will be active, whilst if the usage is below the floor value, the delta alerts will not trigger.
I hope this helps, let us know how you get on!