Skip to content

Conversation

@jadametz
Copy link
Contributor

@jadametz jadametz commented Apr 7, 2016

Cachet is an open source status page system. This change adds the ability for consulalerting to communicate Consul state changes to Cachet as incidents.

This pull request increments consulalerting to version 0.0.5.

Required KVs

  • api_token: The API token provided by Cachet via a user profile page
  • site_url: The URL of the Cachet instance
  • notify_subscribers: A boolean for whether or not subscribers should be notified of incidents

Component specific incident reporting

The plugin relies on the ability to match provided Consul tags to Cachet components. Upon successful match the incident will be reported specifically for that component.

For example:
If a Component in Cachet is setup with the name Data Import Service the Consul tags would be ["cachet", "Data Import Service"]

Jesse Adametz added 2 commits April 7, 2016 11:54
…d components

- This provides a natural filter so that Cachet only receives information for components it has defined
- Cleaned up tests to reflect this change and remove unnecessary component details
@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 71.429% when pulling 60e6e66 on graphiq:cachet_plugin into 9c83aad on jrxFive:master.

@jadametz
Copy link
Contributor Author

jadametz commented Apr 7, 2016

Apologies for all the comments on the PR. We did some code review beforehand to discuss implementation.

I didn't want to mess around with code style and package implementations that you already had setup. One suggestion to prevent long plugin functions would be to refactor the setup so each plugin is implemented in its own file.

Maybe this is something I'll tackle in a future pull request 😄

@jrxFive
Copy link
Owner

jrxFive commented Apr 7, 2016

@jadametz just did a quick skim looks good and as usual thank you for contributing! Sorry for having to replicate my style =/ its not a huge deal in the future. Yes it does have some smells, plugin separation is a good idea where you could set 'constants' outside of the main runnable notification plugin; as for the _ = Process(...) I can't really recall why I did that maybe a lot of golang (seemingly bad golang too ha) that week?

I'll try to do a further look relatively soon.

@jrxFive jrxFive mentioned this pull request Apr 9, 2016
@jrxFive jrxFive merged commit 60e6e66 into jrxFive:master Apr 9, 2016
@jadametz jadametz deleted the cachet_plugin branch April 11, 2016 16:24
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

Successfully merging this pull request may close these issues.

3 participants