-
Notifications
You must be signed in to change notification settings - Fork 119
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
RFC : Riemann-consul : Sends consul services status to riemann #125
Conversation
if (leader_hostname == @hostname) | ||
services = JSON.parse(get(@consul_services_url)) | ||
for service in services | ||
service_name = service[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I'd like to ensure here is to make sure that all these services start with the same word, e.g. "consul whatever", "consul foobar", and so on. That way we don't clobber other services by accident. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, they don't. Do you want me to add "consul" as a prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be great, thanks! Most folks use riemann to monitor multiple things so having prefixes keeps things easy to organize. :-)
On Oct 5, 2015 9:39 AM, Shani Elharrar [email protected] wrote:In bin/riemann-consul:
- report(opts)
- end
- def get(url)
- Net::HTTP.get_response(url).body
- end
- def tick
- leader = get(@consul_leader_url)
- leader_hostname = URI.parse("http://" + leader[1..-2]).hostname
- if (leader_hostname == @hostname)
services = JSON.parse(get(@consul_services_url))
for service in services
service_name = service[0]
Oh, they don't. Do you want me to add "consul" as a prefix?
—Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I do that too, I just use tags to keep it organized. I'll add a configurable prefix that will be "defaulted" to "consul."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, any chance you could make that change for me? Would love to get this merged. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did it (pushed w/ force to update in same commit).
Also added node status checking.
508aacb
to
af2bae3
Compare
Good to go! Thanks @shanielh! :) |
RFC : Riemann-consul : Sends consul services status to riemann
Currently it's a basic tool thats changes the status of a service registered to consul if all the health checks inside it are not "ok".
I hope that people that use consul and riemann would have some suggestions to add.