-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
connect: Option to Expose Envoy's /stats/ for agents like DataDog that can read from there. #7070
Comments
@banks I'd like to take a stab! I have little experience with consul, so it might take a few days, hope it's okay! |
@banks I've got the general idea on what we're trying to accomplish, but I want to ask a question before getting my hands dirty. I'm not 100% clear on whether
Should these two endpoints be able to be exposed at the same time? Thanks in advance! |
Hey @tpaschalis would be great to have a contribution here! I think the second of your bullet points is more what I had in mind. The main reason is to avoid a backward incompatible change for folks using It would be possible to achieve either or both with only a single listener with multiple routes setup - currently the prometheus option configures a route for
I don't think that is super important honestly, the stats one will be a superset so folks can use prometheus still with only that set, just at a different path. I think whatever is simplest to code and document is the best plan. Let me know if you have any other questions. Thanks for jumping in! |
Thanks for your comment! I started to implement something like this over the weekend. In addition to the EDIT : Again, thanks for your time. |
That sounds great to me - thanks for your effort on this!
We have an integration test suite in test/integration/connect/envoy. You
can see the existing prometheus tests there.
They are a little complicated to run as they use some basic bash scripting
and docker compose to setup environments. If you can work that out feel
free to add a case or two for this but don't worry if not - we can help or
add those once you have a PR up.
…On Mon, Jan 27, 2020 at 4:21 PM Paschalis Tsilias ***@***.***> wrote:
Thanks for your comment! I started to implement something like this over
the weekend. In addition to the PrometheusBindAddr config field, I have
added a StatsBindAddr field.
Then, there are two cases, (feel free to correct me)
a) The two addresses are the same, so one listener gets created, with two
routes inside
b) The two addresses are not the same, so two listeners must get created,
each with the corresponding route.
Does this sound correct? I'm trying to find a more elegant way to express
and test this, and hopefully open a Draft PR, to get hands-on input.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7070?email_source=notifications&email_token=AAA5QU2RAQQ4PQMWYNXQ7FLQ74CXXA5CNFSM4KHRTEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKADGWA#issuecomment-578827096>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5QU5J3JIGWLTAZC6AAWDQ74CXXANCNFSM4KHRTEHA>
.
|
Hey, thanks for your response. I did run the existing tests and fiddled with adding a new one. I force-pushed my local branch a couple of times until I understood how things work, sorry about that. In any case, I've opened a new PR, that contains the code and the new
Looking forward to your comments and observations! Thanks in advance ^^ |
Currently we allow configuring Prometheus as a metrics sink for Envoy. To do this we configure a pass-through listener on each proxy that allows restricted access to Envoy's internal admin API but currently limits it to
/stats/prometheus
.DataDog is supported natively in Envoy via it's statsd compatible interface, however it's latest service mesh integration relies on the agent polling Envoy's
/stats
endpoint.It's currently possible to work around this using Expose Paths in the service registration but having the intenal endpont be Envoy's own one on localhost rather than something on the app instance.
But it would be better to have a first class experience equivalent to configuring prometheus on the whole mesh that automatically exposes the full
/stats
path not just the prometheus part.The good news is this is very little code to write - the prometheus functionality and tests are almost exactly what we need, we just need a different Envoy config field and when that's used we change the path below to
/stats/
rather than/stats/prometheus
:consul/command/connect/envoy/bootstrap_config.go
Line 423 in 8673bc2
There are other subtle changes needed possible - the URL we expose on the listener should probably be
/stats
to mirror native Envoy and we should probably re-use that huge method between the two options and just allow passing in those parts.The text was updated successfully, but these errors were encountered: