feat 接入Prometheus

This commit is contained in:
2025-12-17 21:05:12 +08:00
parent efa9f50d3e
commit da91cff056
24 changed files with 289 additions and 60 deletions

View File

@@ -8,6 +8,11 @@ log:
maxBackups: 100
maxAge: 7
monitor:
prometheus:
address: "0.0.0.0"
port: 8504
db:
etcd:
address: [ "10.0.40.9:2379" ]

View File

@@ -5,10 +5,11 @@ import "common/config"
const path = "./config"
type Config struct {
App *config.AppConfig `yaml:"app"`
Log *config.LogConfig `yaml:"log"`
DB *config.DBConfig `yaml:"db"`
Serve *config.ServeConfig `yaml:"serve"`
App *config.AppConfig `yaml:"app"`
Log *config.LogConfig `yaml:"log"`
Monitor *config.MonitorConfig `yaml:"monitor"`
DB *config.DBConfig `yaml:"db"`
Serve *config.ServeConfig `yaml:"serve"`
}
var cfg *Config

View File

@@ -8,6 +8,11 @@ log:
maxBackups: 100
maxAge: 7
monitor:
prometheus:
address: "0.0.0.0"
port: 8504
db:
etcd:
address: [ "172.18.28.0:2379" ]