fastly / fastly-exporter

A Prometheus exporter for the Fastly Real-time Analytics API
Apache License 2.0
99 stars 36 forks source link

Add basic http status pages. #70

Closed SuperQ closed 3 years ago

SuperQ commented 3 years ago

Signed-off-by: SuperQ superq@gmail.com

peterbourgon commented 3 years ago

Add a / landing page...

Mmmmmaybe. Is there a concrete problem being solved with this?

Add a /-/ready endpoint for supervisors

Anything which needs to know the health of the exporter can HEAD the metrics endpoint. See #61. If there's something I'm overlooking, though, please tell me.

SuperQ commented 3 years ago

It's pretty standard for exporters to have a root landing page, rather than the current behavior of 404.

Kubernetes standard readiness probes do a GET. There is no option to change the request method.

Doing a GET on the metrics endpoint can be very large, and Kubernetes will probe this regularly, eating up a lot of resources in both the exporter and the Kubelet services.

peterbourgon commented 3 years ago

Doing a GET on the metrics endpoint can be very large

Agreed, this isn't a solution, but...

There is no option to change the request method.

This is broken 🤷

peterbourgon commented 3 years ago

It's pretty standard for exporters to have a root landing page

Sure, but who's going there? Humans, when debugging or whatever?

SuperQ commented 3 years ago

Yes, the root page is a convenience page for humans.

Also, this is just a first pass. Eventually we could tie the readiness check into if the exporter has a valid connection to the RT API. This way Kubernetes can avoid sending traffic (Prometheus) to a broken instance. It also informs Kubernetes to wait to tear down the old instance(s) when doing upgrades.

SuperQ commented 3 years ago

Closing in favor of #73