Prometheus Monitoring gets 401 Unauthorized

I’m self hosting Vikunja and loving it so far. I want to add it to our Prometheus config but when I follow the instructions in the docs, I get a 401 Unauthorized error and the following error message:

{
message: "missing, malformed, expired or otherwise invalid token provided"
}

This leads me to think that I need to set a JWT token in the authorization header. However, the docs have no mention of this, or how to actually go about generating a token for this purpose. I found the API token generation page in my account settings, but it doesn’t work even if I give it permissions to everything and generate the token with that. Can anyone help me with this? Thanks!

Did you enable the metrics endpoint in your config file?

https://vikunja.io/docs/config-options/#0–metrics

Ah I didn’t! Thanks that worked! Could you maybe add a reference to it in the docs I shared about Prometheus as well?

Thanks for the hint, I’ve just added a note to it.