sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

Feature request: Prometheus metrics

Open mazzz1y opened this issue 1 year ago • 0 comments

I think it is good to have something to monitor service stats. With v2ray/xray we can use v2ray-exporter -- tool which converts built-in stats into prometheus metrics.

I think it is possible to serve /metrics path directly by sing-box and avoid to use external exporters.

For example:

{
    "stats": {
        "enabled": true
    },
    "inbounds": [
      {
        "type": "prometheus",
        "tag": "prometeus-in",
        "listen": "::",
        "listen_port": 1080,
        "path": "/metrics",
        // basic auth
        "users": [
            {
              "username": "admin",
              "password": "admin"
            }
          ]
      }
    ]
}

mazzz1y avatar Sep 15 '22 07:09 mazzz1y