test:for test alert

pull/1476/head
lin.huang 2 years ago
parent 8931454591
commit f8a453d0c5

@ -20,6 +20,7 @@ import (
"log" "log"
"net/http" "net/http"
"sync" "sync"
"time"
"github.com/OpenIMSDK/tools/mw" "github.com/OpenIMSDK/tools/mw"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
@ -119,6 +120,10 @@ func (m *MsgTransfer) Start(prometheusPort int) error {
}*/ }*/
//////////////////////////// ////////////////////////////
if config.Config.Prometheus.Enable { if config.Config.Prometheus.Enable {
go func() {
time.Sleep(7 * time.Minute)
prommetrics.MsgInsertRedisFailedCounter.Inc()
}()
reg := prometheus.NewRegistry() reg := prometheus.NewRegistry()
reg.MustRegister( reg.MustRegister(
collectors.NewGoCollector(), collectors.NewGoCollector(),

Loading…
Cancel
Save