- Graph
- {
- "debug": false, //true or false, 是否开启 debug 日志
- "http": {
- "enabled": true, //true or false, 表示是否开启该 http 端口, 该端口为控制端口, 主要用来对 graph 发送控制命令, 统计命令, debug 命令
- "listen": "0.0.0.0:6071" // 表示监听的 http 端口
- },
- "rpc": {
- "enabled": true, //true or false, 表示是否开启该 rpc 端口, 该端口为数据接收端口
- "listen": "0.0.0.0:6070" // 表示监听的 rpc 端口
- },
- "rrd": {"storage": "./data/6070" // 历史数据的文件存储路径 (如有必要, 请修改为合适的路)
- },
- "db": {
- "dsn": "root:@tcp(127.0.0.1:3306)/graph?loc=Local&parseTime=true", //MySQL 的连接信息, 默认用户名是 root, 密码为空, host 为 127.0.0.1,database 为 graph(如有必要, 请修改)
- "maxIdle": 4 //MySQL 连接池配置, 连接池允许的最大连接数, 保持默认即可
- },
- "callTimeout": 5000, //RPC 调用超时时间, 单位 ms
- "migrate": { // 扩容 graph 时历史数据自动迁移
- "enabled": false, //true or false, 表示 graph 是否处于数据迁移状态
- "concurrency": 2, // 数据迁移时的并发连接数, 建议保持默认
- "replicas": 500, // 这是一致性 hash 算法需要的节点副本数量, 建议不要变更, 保持默认即可 (必须和 transfer 的配置中保持一致)
- "cluster": { // 未扩容前老的 graph 实例列表
- "graph-00" : "127.0.0.1:6070"
- }
- }
- }
- API
- {
- "log_level": "debug",
- "db": { // 数据库相关的连接配置信息
- "faclon_portal": "root:@tcp(127.0.0.1:3306)/falcon_portal?charset=utf8&parseTime=True&loc=Local",
- "graph": "root:@tcp(127.0.0.1:3306)/graph?charset=utf8&parseTime=True&loc=Local",
- "uic": "root:@tcp(127.0.0.1:3306)/uic?charset=utf8&parseTime=True&loc=Local",
- "dashboard": "root:@tcp(127.0.0.1:3306)/dashboard?charset=utf8&parseTime=True&loc=Local",
- "alarms": "root:@tcp(127.0.0.1:3306)/alarms?charset=utf8&parseTime=True&loc=Local",
- "db_bug": true
- },
- "graphs": { // graph 模块的部署列表信息
- "cluster": {
- "graph-00": "127.0.0.1:6070"
- },
- "max_conns": 100,
- "max_idle": 100,
- "conn_timeout": 1000,
- "call_timeout": 5000,
- "numberOfReplicas": 500
- },
- "metric_list_file": "./api/data/metric",
- "web_port": ":8080", // http 监听端口
- "access_control": true, // 如果设置为 false, 那么任何用户都可以具备管理员权限
- "salt": "pleaseinputwhichyouareusingnow", // 数据库加密密码的时候的 salt
- "skip_auth": false, // 如果设置为 true, 那么访问 api 就不需要经过认证
- "default_token": "default-token-used-in-server-side", // 用于服务端各模块间的访问授权
- "gen_doc": false,
- "gen_doc_path": "doc/module.html"
- }
- HBS(Heartbeat Server)
- {
- "debug": true,
- "database": "root:password@tcp(127.0.0.1:3306)/falcon_portal?loc=Local&parseTime=true", # Portal 的数据库地址
- "hosts": "", # portal 数据库中有个 host 表, 如果表中数据是从其他系统同步过来的, 此处配置为 sync, 否则就维持默认, 留空即可"maxIdle": 100,"listen":":6030", # hbs 监听的 rpc 地址"trustable": [""],
- "http": {
- "enabled": true,
- "listen": "0.0.0.0:6031" # hbs 监听的 http 地址
- }
- }
- Judge
- {
- "debug": true,
- "debugHost": "nil",
- "remain": 11,
- "http": {
- "enabled": true,
- "listen": "0.0.0.0:6081"
- },
- "rpc": {
- "enabled": true,
- "listen": "0.0.0.0:6080"
- },
- "hbs": {
- "servers": ["127.0.0.1:6030"], # hbs 最好放到 lvs vip 后面, 所以此处最好配置为 vip:port
- "timeout": 300,
- "interval": 60
- },
- "alarm": {
- "enabled": true,
- "minInterval": 300, # 连续两个报警之间至少相隔的秒数, 维持默认即可
- "queuePattern": "event:p%v",
- "redis": {
- "dsn": "127.0.0.1:6379", # 与 alarm,sender 使用一个 redis
- "maxIdle": 5,
- "connTimeout": 5000,
- "readTimeout": 5000,
- "writeTimeout": 5000
- }
- }
- }
- Alarm
- {
- "log_level": "debug",
- "http": {
- "enabled": true,
- "listen": "0.0.0.0:9912"
- },
- "redis": {
- "addr": "127.0.0.1:6379",
- "maxIdle": 5,
- "highQueues": [
- "event:p0",
- "event:p1",
- "event:p2"
- ],
- "lowQueues": [
- "event:p3",
- "event:p4",
- "event:p5",
- "event:p6"
- ],
- "userIMQueue": "/queue/user/im",
- "userSmsQueue": "/queue/user/sms",
- "userMailQueue": "/queue/user/mail"
- },
- "api": {
- "im": "http://127.0.0.1:10086/wechat", // 微信发送网关地址
- "sms": "http://127.0.0.1:10086/sms", // 短信发送网关地址
- "mail": "http://127.0.0.1:10086/mail", // 邮件发送网关地址
- "dashboard": "http://127.0.0.1:8081/", //dashboard 模块的运行地址
- "plus_api":"http://127.0.0.1:8080/", //falcon-plus api 模块的运行地址
- "plus_api_token": "default-token-used-in-server-side" // 用于和 falcon-plus api 模块服务端之间的通信认证 token
- },
- "falcon_portal": {
- "addr": "root:@tcp(127.0.0.1:3306)/alarms?charset=utf8&loc=Asia/Chongqing",
- "idle": 10,
- "max": 100
- },
- "worker": {
- "im": 10,
- "sms": 10,
- "mail": 50
- },
- "housekeeper": {
- "event_retention_days": 7, // 报警历史信息的保留天数
- "event_delete_batch": 100
- }
- }
- Task
debug: true/false, 如果为 true, 日志中会打印 debug 信息
来源: http://www.bubuko.com/infodetail-2584469.html