aboutsummaryrefslogtreecommitdiff
path: root/cmd/cashierd/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/cashierd/main.go')
-rw-r--r--cmd/cashierd/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/cashierd/main.go b/cmd/cashierd/main.go
index 7277773..85c2d81 100644
--- a/cmd/cashierd/main.go
+++ b/cmd/cashierd/main.go
@@ -33,12 +33,14 @@ import (
"github.com/nsheridan/cashier/server/auth/gitlab"
"github.com/nsheridan/cashier/server/auth/google"
"github.com/nsheridan/cashier/server/config"
+ "github.com/nsheridan/cashier/server/metrics"
"github.com/nsheridan/cashier/server/signer"
"github.com/nsheridan/cashier/server/static"
"github.com/nsheridan/cashier/server/store"
"github.com/nsheridan/cashier/server/templates"
"github.com/nsheridan/cashier/server/wkfs/vaultfs"
"github.com/nsheridan/wkfs/s3"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sid77/drop"
)
@@ -374,6 +376,8 @@ func main() {
}
// Unprivileged section
+ metrics.Register()
+
var authprovider auth.Provider
switch conf.Auth.Provider {
case "google":
@@ -416,6 +420,7 @@ func main() {
r.Methods("POST").Path("/admin/revoke").Handler(CSRF(appHandler{ctx, revokeCertHandler}))
r.Methods("GET").Path("/admin/certs").Handler(CSRF(appHandler{ctx, listAllCertsHandler}))
r.Methods("GET").Path("/admin/certs.json").Handler(appHandler{ctx, listCertsJSONHandler})
+ r.Methods("GET").Path("/metrics").Handler(promhttp.Handler())
r.PathPrefix("/").Handler(http.FileServer(static.FS(false)))
h := handlers.LoggingHandler(logfile, r)