Minitron.rb is a Zendesk => Segment.io webhook-based integration.
Tickets updated to a Closed
status will trigger a post to the sinatra server which contains ID, Status, and Group. Minitron uses the ticket ID to query the Zendesk api for ticket and ticket_metric data which is forwarded on to Segment.
-
Set up a local enpdoint using Localtunnel.
a) Install localtunnel
b) Run it using port
4567
lt --port 4567
-
Set up a test target and trigger in Zendesk.
a) The Zendesk trigger should require the requester be you (the tester) and include any change. The trigger message should be a json block that includes the id and status.
{ "id": "{{ticket.id}}", "group":"{{ticket.group.name}}", "status": "{{ticket.status}}" }
b) The Zendesk target should be set to the local endpoint you set up in (1). NB: You will need to reset this endpoint each time the tunnel session ends
-
Make your changes to the app, then fire it up and alter your test ticket to see the response.
-
View any received messages in the segment debugger logs.
-
Create an app in your Aptible dashboard for Minitron.
-
Use the Aptible CLI to set necessary env variables:
aptible config:set SEGMENTIO_WRITEKEY=<YOUR_KEY> ZENDESK_TOKEN=<YOUR_TOKEN> ZENDESK_USER=<YOUR_USER> PORT=3000 --app Minitron
- Clone this repository and push it to your Aptible app:
git clone https://github.com/aptible/minitron.git
cd minitron
git remote add aptible git@beta.aptible.com:minitron.git
git push aptible master
- Set your Zendesk target endpoint to your aptible domain (e.g. minitron.on-aptible.com)
MIT License, see LICENSE for details.
Copyright (c) 2015 Aptible. All rights reserved.