diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-24 00:10:31 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-24 00:10:31 +0800 |
commit | bb3b881a0cef2248e15452ed1eead630b9ba0f75 (patch) | |
tree | bc6c270c8f3193010cf7f1f0be2c0211cd843106 /main.go | |
parent | Reuse the cache for /tree (diff) | |
download | forge-bb3b881a0cef2248e15452ed1eead630b9ba0f75.tar.gz forge-bb3b881a0cef2248e15452ed1eead630b9ba0f75.tar.zst forge-bb3b881a0cef2248e15452ed1eead630b9ba0f75.zip |
Add prometheus
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 {} } |