pull/351/head
wangchuxiao 2 years ago
parent dd47dbffe8
commit f41cebe776

@ -171,4 +171,4 @@ services:
restart: always
ports:
- "9100:9100"
command: --collector.ENTER-THE-NAME-OF-COLLECTOR
# command: --collector.ENTER-THE-NAME-OF-COLLECTOR

@ -11,13 +11,12 @@ scrape_configs:
- targets: ['localhost:9091']
- job_name: 'openIM-server'
metrics_path: /metrics
static_configs:
- targets: ['localhost:10006']
metrics_path: /cms/prometheus/metrics
labels:
group: 'cms-api'
- targets: ['localhost:21400']
metrics_path: /metrics
labels:
group: 'msg-transfer'

@ -17,14 +17,11 @@ import (
func NewGinRouter() *gin.Engine {
gin.SetMode(gin.ReleaseMode)
baseRouter := gin.Default()
router := baseRouter.Group("/cms")
router.Use(middleware.CorsHandler())
if config.Config.Prometheus.Enable {
prometheusRouterGroup := router.Group("/prometheus")
{
prometheusRouterGroup.GET("/metrics", prometheusHandler())
}
baseRouter.GET("/metrics", prometheusHandler())
}
router := baseRouter.Group("/cms")
router.Use(middleware.CorsHandler())
adminRouterGroup := router.Group("/admin")
{
adminRouterGroup.POST("/login", admin.AdminLogin)

@ -139,15 +139,15 @@ type config struct {
OpenImRealTimeCommPort []int `yaml:"openImRealTimeCommPort"`
}
RpcRegisterName struct {
OpenImStatisticsName string `yaml:"openImStatisticsName"`
OpenImUserName string `yaml:"openImUserName"`
OpenImFriendName string `yaml:"openImFriendName"`
OpenImUserName string `yaml:"openImUserName"`
OpenImFriendName string `yaml:"openImFriendName"`
// OpenImOfflineMessageName string `yaml:"openImOfflineMessageName"`
OpenImMsgName string `yaml:"openImMsgName"`
OpenImPushName string `yaml:"openImPushName"`
OpenImRelayName string `yaml:"openImRelayName"`
OpenImGroupName string `yaml:"openImGroupName"`
OpenImAuthName string `yaml:"openImAuthName"`
OpenImAdminCMSName string `yaml:"openImAdminCMSName"`
OpenImOfficeName string `yaml:"openImOfficeName"`
OpenImOrganizationName string `yaml:"openImOrganizationName"`
OpenImConversationName string `yaml:"openImConversationName"`

Loading…
Cancel
Save