Complex Datapoint Help...
I'm by no means a guru when it comes to groovy or infix/rpn but I can't for the life of me create the Complex Datapoint I want. Here are the items collected by my DataSource. The Complex Datapoint I cant get working is the AutoHeal trigger. I've tried to use AI to help me build a query in the correct format, but none seem to work property and the documentation is pretty light on examples. Here is what I'm trying to do in a nutshell. If the 1_AutoStart value comes back as 1, and the 3_LatestState is not a 1, and the 2_RunningCount is less than 90% of 0_SampleCount, throw a 1, else throw a 0. Here is the current AI generated groovy code to try and accomplish this, but I get NoData with it. I've tried many different sample codes for both groofy and infix/rpn with no success. It doesn't like the "lt" in the GUI on many of the code samples, but accepts this one. if(1_AutoStart==1, if(4_AutoHealService==1, if(3_LatestState!=1, if(2_RunningCount/0_SampleCount<1, 1, 0), 0), 0), 0) Here is the GUI error when I try AI generated RPN code. Any thoughts or suggestions?34Views0likes1CommentCan token values be evaluated in a complex datapoint?
I would like to construct a conditional datapoint which returns a value if the instance WILDVALUE is equal to a match, otherwise a different value is returned. Is it possible in expressions or groovy script complex datapoints to include tokens such as ##WILDVALUE##? These are some examples which are not currently working: eq(##WILDVALUE##,"C:\") or if(output[##WILDVALUE##]=="C:\") { return(1); } else { return(0); }248Views5likes5CommentsComplex Goovy Datapoint Conditional Statement
I would like to construct an evaluation in a complex datapoint for disk volume--my goals is to evaluate if a disk is both above 90% capacity and has less than 100GB space available. The current thresholds only based on percentages are less valuable with high capacity volumes. This is a WMI collection type, and I have been able to return the values of theses variables: output["FREESPACE"] output["CAPACITY"] However, as soon as I attempt to put conditions into a groovy statement I am not able to return a value. I want to confirm that performing conditional statements is possible, and if so if anyone has an example of a statement I could borrow as a template. I have tried this with no success so far: if (((output["CAPACITY"]-output["FREESPACE"])/output["CAPACITY"])*100,output["FREESPACE"]/1024/1024/1024) { return(1); } else { return(0); } even a simple operation doesn’t work, like this: testSpace = output["FREESPACE"] - output["CAPACITY"]; return (testSpace); Any help is appreciated.164Views2likes3Comments