GithubHelp home page GithubHelp logo

tylerconlee / slab Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 3.0 758 KB

Slack bot monitoring upcoming SLA breaches in Zendesk

License: GNU General Public License v3.0

Go 99.62% Makefile 0.38%
zendesk slack bot sla-breaches

slab's People

Contributors

li3n3 avatar tylerconlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

slab's Issues

Add configuration for toggleable notifications

To avoid notification overload, but also keep the tool business agnostic, add a bool for if a given level should send channel notifications. If false, all @ mentions would be removed.

Add configurable port setting

To avoid port collision, add a configuration option for the port that the app runs on, allowing multiple instances of the app to run on a given server.

Create API for use in other apps

Several other apps, including other Slack apps, could make use of the upcoming SLA notifications. Creating an API where these other apps can access that data would be incredibly helpful.

Display CSAT as part of ticket notification

On the More Info screen, previous ticket CSATs can be displayed to give some context as to the attitude of the customer towards the support given. With a history of how the customer responds, an agent can then tailor the messaging even further to ensure the customer gets the best service possible.

Expand on Readme

Right now, the readme is written for an older version that does not have all of the SLA configuration documented. Add in the documentation, either in Readme.md or in the docs/ folder.

Improve readme

The readme should contain everything needed to get started with Slab, and it currently doesn't. The information in the wiki is likely out of date, so moving everything back into the readme to keep it updated regularly is likely the best way to move forward.

Add help command

For new users, @slab help would be an incredibly useful command that lists out the commands and a short description of what they do.

Add channel updater

SLAB should update the channel that it monitors to show who is currently set as triager and maybe the connection status of Slack and Zendesk.

Handle Zendesk timeouts without segfaults

time="2018-04-23T13:38:54Z" level=error msg="Error reaching Zendesk" error="Get https://circleci.zendesk.com/api/v2/incremental/tickets.json?include=slas&start_time=1524058674: net/http: request canceled (Client.Timeout exceeded while awaiting headers)" module=zendesk

After this issue, Slab attempts to parse data from that call. Because there's no data, a segfault occurs. It shouldn't.

Index out of range on SLA breach

SLAB crashes if the SLA breach time is nil, or the index for the SLA slice is nil. Add in some additional checking to verify that exists before attempting to manipulate that data.

panic: runtime error: index out of range

goroutine 1 [running]:
github.com/tylerconlee/slab/sla.GetTimeRemaining(0x66e7, 0xc4201f7590, 0xe, 0x84d7c8, 0x0, 0x0, 0xc42032bf00, 0x2, 0x4, 0x6e307b, ...)
	/Users/tylerconlee/Repos/Go/src/github.com/tylerconlee/slab/sla/analyzer.go:28 +0x268
github.com/tylerconlee/slab/sla.UpdateCache(0x66e7, 0xc4201f7590, 0xe, 0x84d7c8, 0x0, 0x0, 0xc42032bf00, 0x2, 0x4, 0x6e307b, ...)
	/Users/tylerconlee/Repos/Go/src/github.com/tylerconlee/slab/sla/analyzer.go:72 +0x5a
main.RunTimer(0x8bb2c97000)
	/Users/tylerconlee/Repos/Go/src/github.com/tylerconlee/slab/timer.go:25 +0x3d7
main.main()
	/Users/tylerconlee/Repos/Go/src/github.com/tylerconlee/slab/main.go:22 +0x1dc

Merge tylerconlee/oncall to this repo

Instead of having two separate bots, SLAB can be used as an overall support Slack bot, rather than just an SLA monitor.

This would allow notifications for SLAB to be set to just the person who is listed as @oncall, or to the channel as a whole. It would also make maintenance a whole lot easier.

Add unset command

Unset should set the Triager role back to the user ID of the bot.

Add additional status data to metadata

Mentioned in #23, with the status page available at localhost:8081, the metadata displayed there can be expanded upon to show the status of connections to Zendesk and Slack, what channel is being monitored, and when the last loop of Zendesk tickets was analyzed.

Run triage alerts to main Slack channel

To keep everything consolidated in one area, a setting should be created to allow triage alerts to be sent to the main Slack channel instead of to the listed Triager.

Add third party integration support

Notifications through Slack may be just one avenue for the monitor. Slack could be the primary target for notifications, but services like Twilio, Pagerduty, etc could be used as a supplement.

Add monitor for new submitted tickets

For the triager to be effective, new tickets submitted to Zendesk have to be visible to the triager. Slab should monitor when new tickets are submitted and update either the Slack channel, or a direct message to the person who is assigned as triager.

SLAB crashes when EOF reached in Zendesk API

20:00:14.344 zendesk ▶ CRIT  Get https://***.zendesk.com/api/v2/incremental/tickets.json?include=slas&start_time=1511294407: EOF
 github.com/tylerconlee/slab/zendesk makeRequest ▶ api.go:115

Handle EOF by waiting until next loop cycle and redoing the API call.

Filter and redirect tickets based on group

The ticket endpoint in Zendesk has a group assignee ID, so I could rewrite the API all to filter based off of configurable group IDs, or leave blank for all tickets. Once filtered, split the channels that the notifications go to. Rewrite to allow tickets assigned to a specific group get routed to a specific channel that would allow other teams to get notifications for their tickets individually

Expand Status Page

Show connection status of Zendesk and Slack, last time loop was completed for tickets, who is currently set as triager, etc.

Create setup wizard for configuration generation

Instead of requiring a config.toml to start up, if a config.toml isn't present, Slab should start a setup wizard.

The new start up command would be:

./slab -s=<SLACK-TOKEN> -c=<SLACK-CHANNEL-ID>

The setup would then be ran by DMing the Slab app with @slab setup

Change Zendesk processing to be more event like

Instead of having a single routine grab Zendesk data, loop through all of it, then loop through previous sent ticket notifications and then send notifications, this can be split into a more streamlined approach, where as the loop processes Zendesk data on each ticket, Slab analyzes the ticket and determines if another notification is necessary. This cuts down on the amount of processing time by allowing Slab to handle the notification right then and there, instead of going through 3 more loops before sending the notification.

Add slackbot integration

Make SLAB a two-way street, allowing users to query SLAB for version, uptime and other metadata

Add More Info button to SLA notification messages

The more info button would allow for additional context provided in the Slack message for an SLA notification, including the requester, if that requester has other open tickets, what their average CSAT scores are, if applicable, and if the response in question is from when the ticket opened, or somewhere down the line.

Includes #110, #116, #115

Show date in log format

Within the logs currently, the time is displayed, but not the date, making it difficult to determine when an issue happened. Add the date into the log format.

Update default text for messages

Most of Slab's default messages are .... This should either be blank or a more descriptive message, as the message right now isn't helpful

Include ticket requestor as author

Slack has the ability to show an author for an attachment. For SLA messages or for any other message where a ticket is displayed, the author should be set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.