diff --git a/conf/config_server.yaml.templete b/conf/config_server.yaml.templete index 4525f757a990d1aa590c0ee7315a1a37b43758d4..e65faa1395b2fc36dbd51b840e0ff97730e59494 100644 --- a/conf/config_server.yaml.templete +++ b/conf/config_server.yaml.templete @@ -1,7 +1,8 @@ topo: server_addr: "localhost:9991" + use: true agent_port: "9992" - database: "neo4j" + graphDB: "neo4j" period: 5 PilotGo: http_addr: "localhost:8888" @@ -12,7 +13,11 @@ log: max_file: 1 max_size: 10485760 neo4j: - addr: "bolt://10.41.121.1:7687" + addr: "bolt://localhost:7687" username: "" password: "" - DB: "neo4j" \ No newline at end of file + DB: "neo4j" +prometheus: + use: false + addr: "http://localhost:9090" + period: 5 \ No newline at end of file diff --git a/server/conf/config.go b/server/conf/config.go index a0084e66033bbd15f21e030f9a7c4015bb0a2473..dcb62f400718627c211c98322bca3b5247c1f65c 100644 --- a/server/conf/config.go +++ b/server/conf/config.go @@ -8,8 +8,9 @@ import ( type TopoConf struct { Server_addr string `yaml:"server_addr"` + Use bool `yaml:"use"` Agent_port string `yaml:"agent_port"` - Database string `yaml:"database"` + GraphDB string `yaml:"graphDB"` Period int64 `yaml:"period"` } @@ -29,12 +30,19 @@ type Neo4jConf struct { DB string `yaml:"DB"` } +type PrometheusConf struct { + Use bool `yaml:"use"` + Addr string `yaml:"addr"` + Period int64 `yaml:"period"` +} + type ServerConfig struct { - Topo *TopoConf `yaml:"topo"` - PilotGo *PilotGoConf `yaml:"PilotGo"` - Logopts *logger.LogOpts `yaml:"log"` - Arangodb *ArangodbConf `yaml:"arangodb"` - Neo4j *Neo4jConf `yaml:"neo4j"` + Topo *TopoConf `yaml:"topo"` + PilotGo *PilotGoConf `yaml:"PilotGo"` + Logopts *logger.LogOpts `yaml:"log"` + Arangodb *ArangodbConf `yaml:"arangodb"` + Neo4j *Neo4jConf `yaml:"neo4j"` + Prometheus *PrometheusConf `yaml:"prometheus"` } const config_type = "config_server.yaml"