Forum Discussion

jonathanbarrow's avatar
26 days ago

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?

1 Reply

  • Hey Jonathan, 

    It's been awhile since I've messaged with complex datapoints but going based on what you're trying to do try: if(eq(1_AutoStart,1),if(eq(4_AutoHealService,1),if(if(eq(3_LatestState,1),0,1),if(lt(2_RunningCount, 0_SampleCount*0.9),1,0),0),0),0)

    I looked at old complex datapoints i had to made that were custom and then the documentation here if you havent seen it: https://www.logicmonitor.com/support/logicmodules/datasources/datapoints/complex-datapoints

     

    I tested to see if the complex datapoint gets accepted as valid by just making dummy datapoints with those names, but i cant confirm without actual data.