Forum Discussion
Possibly more simply (no need to call the API) but with possibly less finesse, you could consider using complex datapoints and a simple delta threshold. You can extend this using an instance or resource property for further control.
For example, a complex datapoint for alerting on a substantial change in the % used value, but that you only care about if you’re already over 80%, could be:
Datapoint iCareAboutThisDelta, with expression:
if(ge(PercentUsed,80),PercentUsed,80)
A delta alert threshold will never trigger on this if PercentUsed is below 80, because this datapoint will return a flat 80 in those conditions.
You could extend this with a further complex datapoint that brought in the value of a resource or instance property if you wanted to set different base values - let’s call it deltaFloor - or the wildalias or wildvalue if you wanted to target all C drives (etc).
E.g. a groovy scripted datapoint might contain:
resourceProp_value = hostProps.get('propertyName');
if (resourceProp_value == '') {return 80} else {return resourceProp_value}
instanceProps.get(‘’) will work for instance level properties in a similar manner, so you could return a 1 or 0 dependent on wildvalue or wildalias being or containing a certain string (such as C, D, etc), to determine whether the final complex datapoint, on which the delta threshold would be set, returns a value at all, whether it’s a flatline, or whether it’s a moving number in the range you care about.
Obviously, no good for meaningful graphing, but potentially useful for changes within a range of concern.
You are still limited to a delta threshold being from one poll to the next, rather than over multiple polls across half an hour, but in some cases this may be adequate, and then you don’t need to be loading up the collector and the API (remembering the rate limit for your call is 500 calls / minute, so if you have >1,000 servers and are comparing historic data every 2 minutes, you’ll almost certainly see some 429 codes and consequent data gaps).
Other than that, I love your ingenuity.
Related Content
- 4 years ago
- 8 years ago
- 2 years agoAnonymous
- 3 months ago