cfssl icon indicating copy to clipboard operation
cfssl copied to clipboard

/metrics returns 404 even from localhost

Open akamac opened this issue 3 years ago • 2 comments

I'm trying to query Prometheus metrics from cfssl serve process, but get 404 page not found.

I tried both /metrics and /api/v1/cfssl/metrics. The request is not logged by cfssl even with debug logging enabled.

Are there any settings that should enable the metrics? I could not find any in the source code. Or I'm doing smth wrong, am I?

akamac avatar Dec 02 '21 10:12 akamac

I got the same thing with cfssl 1.4.1

Relevant:

  • https://github.com/cloudflare/cfssl/blob/master/cmd/multirootca/ca.go#L93
  • #1174

(To be fair there is no documentation for such endpoint in /doc/api)

JeanFred avatar Jun 02 '22 13:06 JeanFred

Currently only multirootca exposes prometheus metrics, cfssl does not. There'd need to be a prometheus route added to https://github.com/cloudflare/cfssl/blob/7614d6cad35dd6d33c8c1fc2e2db5d9ce111e56b/cli/serve/serve.go

nickysemenza avatar Aug 23 '22 16:08 nickysemenza