Forum Discussion
Sorry I didn’t state what type of DS this was--it is WMI.
Your replies were both a lot of help. I added DRIVELETTER as a WMI class property name, and then constructed this groovy script with the complex datapoint name “GB_Free_C_CHECK”:
osDrive = property = instanceProps.get("auto.driveletter")
if(osDrive=="C:"){
return 1
} else{
return 0
}
then, I’m working off that datapoint to evaluate another expression datapoint:if(GB_Free_C_CHECK,FreeSpace/1024/1024/1024,0)
Ideally I would like to combine both these into one for simplicity. But I can’t find how to evaluate instance properties within an expression (##INSTANCE## doesn’t validate), or perform math operations within a groovy statement (anything like freeSpace = (output["FREESPACE"] / 1024) returns NaN).
Related Content
- 5 months ago
- 4 months ago
- 5 months ago