run-as-root / magento2-prometheus-exporter

Simple Magento 2 Prometheus Exporter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Authorization to metrics HTTP endpoint

mwr opened this issue · comments

Add Authorization to metrics HTTP endpoint

What about refactoring the "/metrics" route (currently in the "frontend" area) into a REST endpoint ("webapi_rest" area) and use the native Magento integrations for token based authentication?

I decided to add an Authorization Header. In the System Config, you can generate a token which then needs to be configured in Prometheus. Will push soon