Forum Discussion

Vitor_Santos's avatar
4 years ago

Invoke other 'datapoint' values in an alarm message. Is it possible?

Hello,

We've a complex 'datapoint' on a DS that will alarm based on different 'simple datapoint' values.

We've the 'resource actual state' & 'resource configuration state' datapoints & we'll throw a 'Critical' alarm if the 'resource actual state' == 1 , but, in case it's equal to 0 we'll observe the 'resource configuration state' and throw an 'Error' alarm if it's ==1. This is useful for us, because we can have a resource that's online but, facing configuration issues.

Our goal is retrieve both those simple 'datapoint' values in the actual alarm message itself (on the complex datapoint).
I've been reading the doc. & didn't found anything - checked the article below

https://www.logicmonitor.com/support/logicmodules/about-logicmodules/tokens-available-in-datasource-alert-messages

Is this possible?

Thanks,

6 Replies

  • Anonymous's avatar
    Anonymous

    No built in way to reference other datapoints when one datapoint has an alert.

    However, you could make your complex datapoint a little more complex. Not knowing exactly, I assume that resource_actual_state and resource_configuration_state can both be either 0 or 1.

    Your complex datapoint could be:

    (resource_actual_state * 10) + resource_configuration_state

    The resulting values could be 0, 1, 10, or 11. Your threshold could be >0. You could include the value in the alert and provide a description that says the first digit represents the resource_actual_state and the second digit represents the resource_configuration_state.

    Workaround and klugey I know, but it is what it is.

  • 12 hours ago, Stuart Weenig said:

    No built in way to reference other datapoints when one datapoint has an alert.

    However, you could make your complex datapoint a little more complex. Not knowing exactly, I assume that resource_actual_state and resource_configuration_state can both be either 0 or 1.

    Your complex datapoint could be:

    
    (resource_actual_state * 10) + resource_configuration_state

    The resulting values could be 0, 1, 10, or 11. Your threshold could be >0. You could include the value in the alert and provide a description that says the first digit represents the resource_actual_state and the second digit represents the resource_configuration_state.

    Workaround and klugey I know, but it is what it is.

     

    I appreciate your suggestion, however, it doesn't suit our case.

    The complex datapoint is being used to trigger the actual severity of the problem. In case it's a resource fault we want it critical, if it's only config we'll want error instead.
    However, the status that we would like to pass on the message itself can have a lot of values (from the simple datapoint itself).

    It can be 1,2,3,4,5,6,7,etc...

    In sum, we've 2 simple data points that can have multiple values (where >2 isn't healthy). But 1 overrides the other (in terms of the issue itself).
    That's why we came up with the complex expression below:

    if(un(Configuration),if(gt(State,2),1,0),if(gt(State,2),1,if(gt(Configuration,2),2,0)))


    Basically we might have instances the return the 'Configuration' data & others that doesn't. So, we validate if the actual 'Configuration' returns data in first place.
    If it doesn't return proper data then we'll look to 'State' directly (returning 1 if it's >2). If it does return valid 'Data' (!= NaN), evaluate the 'State' first (returning 1 if it's >2) and, if the 'State' isn't >2 then evaluate the 'Configuration' condition (returning 2 if it's >2).

    Then we just alarm 'Error' if it's 2 & 'Critical' if it's 1

    I guess we'll just instruct our team(s) to have a look on the graph(s) for both datapoint values.

    Regards,

     

  • Hello,

    I was able to surpass this by making API requests on the script itself (by update custom properties at the instance level directly).
    We now have 2 properties at the instance level (ResourceState & ResourceConfiguration).

    From there every time the script runs updates both properties with the respective values.
    On the alarm message I'm now able to invoke those tokens (##ResourceState##, etc...) & reflect the values.

    Thank you!

  • Anonymous's avatar
    Anonymous

    Nice I like that! Stinks that you have to go to those lengths to get it to work.

  • 21 minutes ago, Stuart Weenig said:

    Nice I like that! Stinks that you have to go to those lengths to get it to work.

     

    Yeah, this is a feature that our teams are used (from our prev. tools). It was something they really insisted to have.

    Hope it works smoothly :)/emoticons/smile@2x.png 2x" title=":)" width="20" />

    Thanks anyway Stuart!

  • On 9/22/2020 at 4:59 PM, Vitor Santos said:

    Hi Vitor,

    I would like to ask you how you are implemented this solution. I am new around this community and I don´t understand the details . Could you show me in detail?

    Thank you!