Include Graphs in alert messages
Hey All, Couldn't find a way to do this using the alert tokens available so I figured I would post it here. I noticed some cool features from other monitoring tools that allow graphs to be sent in the alert body to PagerDuty. So when I receive a PagerDuty page from LM it would be nice to see the associated graph with the data point that is alerting. While just the alert text is good enough for most scenarios I think seeing how big of a jump/spike the data point made before alerting would be useful. The alert "C drive is 90% full" is all fine and good but when you see a graph showing it go from 12% to that 90% in just a minute or two then you know something is really up and might need more expediency as it will probably continue to fill up at that rate.5Views1like2CommentsBasic Zendesk Integration
The following guide is an example of a custom http integration using the Zendesk API along with some of LogicMonitor's token values. To start off I would recommend reviewing the following resources. LogicMonitor Custom HTTP Delivery Documentation: https://www.logicmonitor.com/support/settings/integrations/custom-http-delivery/ LogicMonitor Tokens: NOTE:(In this guide I create a token ##zendesk.authorid## using a custom property on the device. This allows me to pass this value through the integration. This can be very useful if you need to use the same integration to create tickets as multiple organizations or users. I've included a screenshot below detailing where this is set on the device.) https://www.logicmonitor.com/support/settings/logicmodules/tokens-available-in-datasource-alert-messages/ Zendesk API Documentation: https://developer.zendesk.com/rest_api/docs/core/introduction Complete these steps in Zendesk prior to creating your integration: Create a Zendesk User to be used for authentication. https://support.zendesk.com/hc/en-us/articles/203661986-Adding-agents-and-administrators In the below payloads I use the Zendesk author_id as a token to create, update and close tickets. You can find the author_id for a Zendesk user by checking the following. Configure your Zendesk API key for authentication. https://support.zendesk.com/hc/en-us/articles/226022787-Generating-a-new-API-token- Complete these steps in LogicMonitor to create theIntegration: Add a new Custom HTTP Delivery under Integrations using the following payloads as a starting point. Determine if you would like to use a wildcard for things such as your Zendesk author_id or organization_id etc. Payload Examples: The following examples willCreate, Update and Close ZenDesk tickets with LogicMonitorAlerts. NOTE:When authenticating with the Zendesk api, you will only need to enter your api key in the password field and your username with /token at the end. Active: { "ticket": { "subject": "##LEVEL## - ##HOST## ##INSTANCE##", "type": "incident", "comment": { "body": "Host: ##HOST##\nDatasource: ##DATASOURCE##\nDatapoint: ##DATAPOINT##\nLevel: ##LEVEL##\n Start: ##START##\nDuration: ##DURATION##\nValue: ##VALUE##\nReason: ##DATAPOINT## ##THRESHOLD##"}, "priority": "normal" } } Escalated: { "ticket": { "subject": "##LEVEL## - ##HOST## ##INSTANCE##", "type": "incident", "comment": { "body": "Alert Escalated/De-escalated:\nHost: ##HOST##\nDatasource: ##DATASOURCE##\nDatapoint: ##DATAPOINT##\nLevel: ##LEVEL##\n Start: ##START##\nDuration: ##DURATION##\nValue: ##VALUE##\nReason: ##DATAPOINT## ##THRESHOLD##"}, "priority": "normal" } } Acknowledged: {"ticket": {"status": "open", "comment": { "body": "##MESSAGE##", "author_id": ##zendesk.authorid## }}} Cleared: { "ticket": { "subject": "##LEVEL## - ##HOST## ##INSTANCE##", "type": "incident", "comment": { "body": "Alert Cleared:\nHost: ##HOST##\nDatasource: ##DATASOURCE##\nDatapoint: ##DATAPOINT##\nLevel: ##LEVEL##\n Start: ##START##\nDuration: ##DURATION##\nValue: ##VALUE##\nReason: ##DATAPOINT## ##THRESHOLD##"}, "status": "solved","priority": "normal" } } Here we can see the finished product, a ticket generated and cleared using the above payloads.25Views1like1Comment