Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add health check endpoint #117

Open
JosephSalisbury opened this issue May 4, 2016 · 3 comments
Open

Add health check endpoint #117

JosephSalisbury opened this issue May 4, 2016 · 3 comments

Comments

@JosephSalisbury
Copy link

JosephSalisbury commented May 4, 2016

Hello!
Thanks for this project, we've been using it for the last couple of months.

It would be super useful for us if slack-irc exposed a http health endpoint, so we can add it into our monitoring. Any endpoint that we can use to integrate with Pingdom would be great (green if slack-irc is connected to Slack and IRC, for example).

For background, we're using slack-irc at Giant Swarm, and we're running it on our own cloud infrastructure. We've occasionally seen errors (normally us :D ), and would like to have health checking so we can be informed if there are any issues, instead of having to find out manually.

Thanks

@ekmartin
Copy link
Owner

Hi! Sorry for the extremely late answer. I'm a bit unsure about this one, as I'm a bit concerned about adding a listen port to an application that doesn't have one from before.

At the moment slack-irc should attempt to reconnect to both Slack and IRC multiple times, but naturally there'll be times were this won't be enough. Maybe a better solution would be to crash the application whenever this happens, so that it can be restarted? This should probably be fixed regardless though, especially if it gets stuck in some kind of limbo of not trying to reconnect at all after a while.

@JosephSalisbury
Copy link
Author

Heyo!

Crashing if connections can't be made could help, yeah. We'd have to see if this fixes overall, I'm not certain.

My only concern is that if a connection cannot be made, the difference with crashing is just that the application crash-loops instead of hanging - ops still wouldn't know to attend to it. Maybe put the healthcheck under a configuration option?

@filler
Copy link

filler commented Jul 1, 2016

Ive done something similar like this to shove the bot onto Heroku. Basically pull in express via package.json and swizzle index.js to listen if it detects Heroku, serve some rando payload from the Heroku endpoint, voila!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants