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!
David Bond
Posted 2 years ago·Last reply 2 years ago
4 comments
Kwame Armstrong
·2 years agoHi, 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.
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.
Michael Raymond
·2 years agoDavid_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
OP2 years agoThis 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?
Kwame Armstrong
·2 years agoA Service Insight alert would come from the custom DataSource that is created when a Service is added. Any pertinent information to help identify the DataSource as being related to Service Insights can be added at any time.