Consul Alerts

1,818 views
Skip to first unread message

Dexter John Genterone

unread,
Oct 27, 2014, 9:41:21 PM10/27/14
to consu...@googlegroups.com
Hi All, 


We've been working on a monitoring system based on consul checks and we've decided to open source it. :) It's using consul watches and the configuration is stored on the KV. Notifications are sent when a check has changed status and has stayed at it for a certain duration (prevents flapping). At the moment we got a few built-in notifiers (email, logger, influxdb and slack) but it's quite easy to add custom ones via configuration. 


Still needs some improvements, better doc, cleanup, and need to add a few built-in notifier but at the moment it does what we need (send health check status via email and influxdb). Posting this here in case someone might find it useful and any contributions would be awesome. :) 


Cheers,
~Dexter

Robert Norris

unread,
Oct 28, 2014, 12:14:17 AM10/28/14
to consu...@googlegroups.com
On Tue, Oct 28, 2014, at 12:41 PM, Dexter John Genterone wrote:
We've been working on a monitoring system based on consul checks and we've decided to open source it. :)
 
Ohh, I like this, I like this a lot!
 
Not sure yet where it fits; I think its a couple of steps ahead of us on the consul journey, but I have a feeling we're going to want something like this at some point. Great work :)

Cheers,
Rob N.
 

Hunter Nield

unread,
Oct 30, 2014, 8:35:05 AM10/30/14
to consu...@googlegroups.com
Hi All,

Just a follow up for consul-alerts, we now have binary releases, a Docker image and a few updates including Slack and Influxdb support.

https://registry.hub.docker.com/u/acaleph/consul-alerts/

We'd love feedback (and contributions) so please try it out and lets us know what you think!

Cheers,
Hunter

Marc Cluet

unread,
Nov 4, 2014, 12:46:10 PM11/4/14
to Dexter John Genterone, consu...@googlegroups.com
This is very interesting! Well done :)

Any chance you could provide a K/V config example for a custom alert? I would like to test this to execute a script we already have for release tracking.

Cheers,

--
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dexter John Genterone

unread,
Nov 6, 2014, 7:23:17 AM11/6/14
to consu...@googlegroups.com, dexter.g...@gmail.com
Thanks. 

You can add your own custom health check notifier by setting consul's KV:

KEY: consul-alerts/config/notifiers/custom
VALUE: [ "/path/to/custom/script", "/path/to/another/script" ]

Value should be a JSON array pointing to scripts that will handle the notification. The data passed is a list of checks that have changed status. It can be read via STDIN.

If you need the custom events handlers, you can add them by setting consul's KV:

KEY: consul-alerts/config/events/handlers
VALUE: [ "/path/to/custom/script", "/path/to/another/script" ]

This passes the event payload to the list of scripts defined every time you call consul's event command. (`consul event -name payload`)

Hope this answers the question. We're still working on adding a feature where we can load the config via CLI. By then I'll add a sample config file. 

Cheers,
~Dexter

Marian Ignev

unread,
Jul 21, 2015, 7:26:41 PM7/21/15
to Consul, dexter.g...@gmail.com
Hello,

can I use the slack notifier for example for events or it works only for checks?

Armon Dadgar

unread,
Jul 21, 2015, 9:12:41 PM7/21/15
to consu...@googlegroups.com, Marian Ignev, dexter.g...@gmail.com
Hey Marian,

I’m not sure about the open source tool, but our commercial Atlas offering can do this:

Best Regards,
Armon Dadgar
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---

You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages