darkweak / souin

An HTTP cache system, RFC compliant, compatible with @tyktechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @go-kratos, @gin-gonic, @roadrunner-server, @zalando, @zeromicro, @nginx and @apache

Home Page:https://docs.souin.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prometheus metrics not incrementing

jpds opened this issue · comments

I noticed that on my Caddy instances, the only Souin Prometheus metric that appears to be working is souin_request_counter.

All of the other ones simply remain at 0.

Hello @jpds what's your configuration please?

Basically:

{
      admin [::]:2019

      # Souin
      order cache before rewrite

      cache {
        default_cache_control "public"

        key {
          hide
        }

        nuts {
          path /var/lib/caddy/souin/
        }

        stale 3h
        ttl 14h
      }
      
      servers {
        metrics
        log_credentials
      }
}

test.example.com {
      cache
      
      reverse_proxy [2001:db8::80]:8080
}

I did see that Souin had its own api.prometheus option - but it's odd that that one metric would be working without that too.