DESCRIPTION:
Since many IT people use a ticketing system, they often want to track and handle the alerts and the associated “work” in a ticketing system like Zendesk.
Here’s what this integration does:
- When an alert triggers, LogicMonitor sends a notification (a webhook call) and this creates an incident “ticket” in Zendesk with a status of “new”
- When someone acknowledges the alert, LogicMonitor sends another notification (a webhook call) and this adds a comment to the Zendesk ticket and changes the status from “new” to “pending” to inform people.
- When the problem is fixed or goes away, LogicMonitor sends a ‘clear’ notification (via a webhook call) and this adds a comment to the Zendesk ticket and changes the status to “solved”
SUMMARY OF STEPS:
- I made a LogicMonitor user called “Zendesk user”. It wasn’t required but it just makes things easier to understand when looking at settings. The role/permissions are not important.
- I created an “Integration” called “Zendesk” (this makes an extra ‘contact method’ show up when you build an escalation chain). See below for details on 3 items (new, ack, and close) in this ‘integration’.
- I created an Escalation chain called “Zendesk escalation chain” and I specified the Stage to go to user “Zendesk” and picked the contact method called “Zendesk test”
- I created a rule called “Zendesk rule”. For testing I only made it send notifications for one device for only for my one special datasource called “Mike ping” which makes it less disruptive to other people.
DETAILS:
Below is the info I typed in the “Alert Data” field. I chose JSON format. Notice for this customer, I needed to put in 1 custom field because they set they were set as ‘required fields’ in Zendesk. They are Phone number. If I didn’t specify these fields, then Zendesk would not allow me to change the ticket status to “solved”.
Type of webhook: Active alert (aka new alert)
HTTP method: POST
URL: https:// acme.zendesk.com/api/v2/tickets.json
Use Custom Headers: NO
Data type: RAW (not key/value)
Format: JSON
{"ticket": {"requester": {"name": "Mike Suding", "email": "mike.suding@logicmonitor.com"}, "subject": "LM alert ##ALERTID## ##LEVEL## on host named ##HOST##" starting ##START##, "comment": { "body": "This is an alert from LogicMonitor via webhook \n ##MESSAGE##"}, "priority": "normal"<strong>, "custom_fields": [{"id": 23842396, "value": "805 phone"}]</strong> }}
Type of webhook: Acknowledge
HTTP method: PUT
URL: https:// acme.zendesk.com/api/v2/tickets/##EXTERNALTICKETID##.json
Use Custom headers: NO
Data type: RAW and format: JSON
{"ticket": { "comment": { "body": "Since the LogicMonitor alert was acked, this comment is added to ticket and status changed to pending ##ALERTID## ##ADMIN.EMAIL##" }, "status": "pending" }}
Type of webhook: Cleared (ie close the ticket)
HTTP method: PUT
URL: https:// acme.zendesk.com/api/v2/tickets/##EXTERNALTICKETID##.json
Use custom headers: NO
Data type: RAW and format: JSON
{"ticket": { "status": "solved", "comment": { "body": "The alert is cleared ##ALERTID## so we will set ticket status to SOLVED", "author_id": 21950241428 }}}
note: you need to specify YOUR author_id ( a Zendesk ID number for the agent/user). You can see this in a response when you create a ticket. I used CURL.exe command line. It also shows in response as ‘submitter_id’.
No comments