scross01 / prometheus-klipper-exporter

Prometheus Exporter for Klipper
MIT License
48 stars 10 forks source link

Add Authentication #15

Closed jangrewe closed 1 year ago

jangrewe commented 1 year ago

Thank you for creating this exporter! I just moved away from an Octoprint-based image and had metrics available via a plugin there, but now on FluiddPi there was nothing comparable...

The issue i'm having is that i need to enforce authentication, but i can't seem to figure out how to use an API Key with Prometheus and your exporter... could you add something to allow passing an API key?

scross01 commented 1 year ago

Release v0.8.0 adds options to set the API Key for authentication in either the prometheus.yml config, using a -moonraker.apikey command line option, or setting a MOONRAKER_APIKEY environment variable.

See the Authentication section in the README for usage details.

jangrewe commented 1 year ago

Wow, that was fast - Thank you! 😍

You don't happen to feel like also sharing your Grafana dashboard source, do you? 😁

scross01 commented 1 year ago

I've added an example dashboard that can be imported as a starting point. https://github.com/scross01/prometheus-klipper-exporter/tree/main/example#example-dashboard

jangrewe commented 1 year ago

Beautiful, thank you! 😄