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 docs on how to get Envoy stats with prometheus #264

Merged

Conversation

alvaroaleman
Copy link
Contributor

This PR adds docs on how to get envoy stats with Prometheus. It also adds Prometheus annotations for all deployments/daemonsets.

What's not ideal about this approach is that

  • It requires a non-standard Prometheus config
  • It requires exposing the Envoy admin socket which is especially bad when running with host network

I saw metrics are on the roadmap, what do you think about resolving the two above mentioned issues by proxying the Envoy stats with Contour?

@@ -0,0 +1,47 @@
# Prometheus

With Contour it is possible to get metrics from Envoy. In order for this to work properly,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/it is possible to/you can
s/In order for this to work properly,/To do so,

With Contour it is possible to get metrics from Envoy. In order for this to work properly,
you must expose the Envoy admin socket and configure the Prometheus service discovery correctly.

The admin socket can be made public by running
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with:
"Make the admin socket public:"
(the command makes it clear; you don't need the extra words :-) )

sed 's#"bootstrap", "/config/contour.yaml"#"bootstrap", "/config/contour.yaml", "--admin-address", "0.0.0.0"#g' <your-contour-deployment>.yaml
```

Prometheus needs to have a configuration block that looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omit "to have"

Copy link
Contributor

@Bradamant3 Bradamant3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR -- just a few copyedits to tighten up the prose explanation. Thanks!

Signed-off-by: Alvaro Aleman <alv2412@googlemail.com>
Signed-off-by: Alvaro Aleman <alv2412@googlemail.com>
@alvaroaleman
Copy link
Contributor Author

Thanks for your feedback @Bradamant3, I've updated the PR

Copy link
Contributor

@Bradamant3 Bradamant3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@davecheney
Copy link
Contributor

Thanks. This should probably get a call out on the release notes which are landing straight after this.

@davecheney davecheney merged commit 71bd2a9 into projectcontour:master Mar 12, 2018
@alvaroaleman
Copy link
Contributor Author

Yeah a mention in the release notes would probably be useful. For me the stats are the single real selling point of Contour, because its the one thing Nginx really lacks.

@davecheney
Copy link
Contributor

davecheney commented Mar 13, 2018 via email

@alvaroaleman alvaroaleman deleted the feature/expose-envoy-stats branch March 13, 2018 21:17
sunjayBhatia pushed a commit that referenced this pull request Jan 30, 2023
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
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