From bb3b881a0cef2248e15452ed1eead630b9ba0f75 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 24 Mar 2025 00:10:31 +0800 Subject: Add prometheus --- main.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 444e5b0..89a8608 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( "syscall" "time" + "github.com/prometheus/client_golang/prometheus/promhttp" "go.lindenii.runxiyu.org/lindenii-common/clog" ) @@ -103,5 +104,9 @@ func main() { // IRC bot go ircBotLoop() + // Prometheus + http.Handle("/metrics", promhttp.Handler()) + go http.ListenAndServe(":9112", nil) + select {} } -- cgit v1.2.3