Forum Discussion

David_Bond's avatar
David_Bond
Icon for Professor rankProfessor
2 months ago

API documentation error

The page linked below refers to an alert type called websiteAlert. websiteAlert isn't what LogicMonitor sends when a website reports an issue; we get serviceAlert instead, which isn't mentioned. As we often build logic based on alert type in AlertMagic, having the wrong type listed is a problem for us.

It's also not clear what type of alert will be sent when a service alerts.

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

Whatever the fix, please don't make it a breaking change!

4 Replies

  • Hi, David, 

    The document you linked referenced LMs builtin Tokens. What part of the API documentation needs updating?

    When a Website triggers an alert a LMS alert type is used (LogicMonitor Service). This is because previously websites were referred to as Services in LM.

    It's also not clear what type of alert will be sent when a service alerts.

    You are correct. According to this document: https://www.logicmonitor.com/support/alerts/about-alerts/what-does-logicmonitor-alert-on There isn't a alert type for Services. I'll try to get some clarity around this and see if I can get our documentation updated.

    • mray's avatar
      mray
      Icon for LM Conqueror rankLM Conqueror

      David_Bond 

      This is kinda weird...

      I started playing around with this because I was also curious. There are two different values for "alert type" depending on what you're doing...

      There is the value returned from the alert token ##ALERTTYPE## 
      This value for type is "alert" for LM Service Insight services and "serviceAlert" for websites.

      Then there's the value returned for the "type" field by the API when hitting the endpoint /alert/alerts.
      This value for type is "dataSourceAlert" for LM Service Insight services and "websiteAlert" for websites.

      Confusing right?

      This looks to be a legacy thing from when websites used to be called "services". You can see this in the v1 docs for the API here: https://www.logicmonitor.com/support/rest-api-developers-guide/v1/services/get-services 
      This was before LM Service Insights was a thing.

      Hopefully this at least clarifies things enough for your AlertMagic integration!

      • David_Bond's avatar
        David_Bond
        Icon for Professor rankProfessor

        This is not helpful.

        There should be a way to determine that an alert is a Service Insight alert.  Perhaps there is a regex that can be applied to the DataSource name?  Is there a token for the DaraSource unique name for example and a regex that we can reliably use to detect that it's a Service Insight DataSource?