Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Enable statsd metrics collection for histograms #91

Merged
merged 2 commits into from
May 10, 2018

Conversation

stevesloka
Copy link
Member

@stevesloka stevesloka commented May 5, 2018

This enables histogram support for Envoy metrics by using the statsd exporter to collect data from Envoy and then allow Prometheus to scrape for those metrics.

Note this PR has non-standard Contour builds as it depends on changes to enable statsd endpoints. PR for that is projectcontour/contour#366. Once that merges we can update the image to use a master tag until a new release of Contour.

Fixes #92

Signed-off-by: Steve Sloka steves@heptio.com

@alexbrand
Copy link
Contributor

@stevesloka Is this something that we want to merge with the unofficial image? Or will we wait to get the contour PR merged before merging this?

# metrics. This is because Envoy does not expose prometheus metrics
# without setting the format=prometheus URL parameter on Envoy's stats
# enpdoint.
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_format]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should be able to get rid of this annotation for statsd.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can't, we need to scrape statsd on a different port + mapping. This one reads a different annotation than the normal one.

Copy link
Contributor

Choose a reason for hiding this comment

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

We need the prometheus.io/format annotation for statsd as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahh I see, sorry misread your comment. Yeah I can ditch that one, it's redundant.

kubeconfig Outdated
@@ -0,0 +1,33 @@
apiVersion: v1
Copy link
Contributor

Choose a reason for hiding this comment

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

This file slipped through?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah 😞

@stevesloka
Copy link
Member Author

@alexbrand I removed that config from the prometheus config, also I took out the /metrics annotation from the envoy deployment since it's redundant as well.

@alexbrand
Copy link
Contributor

@stevesloka Sweet! Are we OK with merging this with an unofficial image?

@alexbrand
Copy link
Contributor

@stevesloka and I talked out of band. We decided to merge this using the official contour image with the understanding that statsd metrics will work once the Contour PR is merged.

@alexbrand
Copy link
Contributor

Was about to merge but then realized that the --statsd-enabled flag on the init container would break the envoy deployment. Keeping this PR open until the Contour PR is resolved.

@stevesloka
Copy link
Member Author

Contour has merged the statsd PR, so this is now unblocked. I updated the deployment to use the master tag from Contour until the next release of Contour comes out.

@stevesloka
Copy link
Member Author

Let me review a couple of the stats quickly, might of found an issue.

Signed-off-by: Steve Sloka <steves@heptio.com>
@stevesloka
Copy link
Member Author

I did some testing, the metrics work fine, however, master on Contour is still broken (projectcontour/contour#363). So for this PR I'm using master only for the Envoy config and v0.5.0 for Contour daemon.

Signed-off-by: Steve Sloka <steves@heptio.com>
@stevesloka
Copy link
Member Author

This PR is ready to go, Contour is now fixed on master and I've updated the deployments to use that tag.

Copy link
Contributor

@alexbrand alexbrand left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexbrand alexbrand merged commit dbf916a into projectcontour:master May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants