settings.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. settings:
  2. application:
  3. # dev开发环境 test测试环境 prod线上环境
  4. mode: dev
  5. # 服务器ip,默认使用 0.0.0.0
  6. host: 0.0.0.0
  7. # 服务名称
  8. name: observe-server
  9. # 端口号
  10. port: 8000 # 服务端口号
  11. readtimeout: 1
  12. writertimeout: 2
  13. # 数据权限功能开关
  14. enabledp: false
  15. logger:
  16. # 日志存放路径
  17. path: temp/logs
  18. # 日志输出,file:文件,default:命令行,其他:命令行
  19. stdout: "" #控制台日志,启用后,不输出到文件
  20. # 日志等级, trace, debug, info, warn, error, fatal
  21. level: debug
  22. # 数据库日志开关
  23. enableddb: false
  24. jwt:
  25. # token 密钥,生产环境时及的修改
  26. secret: hFj50izBbnDK1UFueTHh
  27. # token 过期时间 单位:秒
  28. timeout: 3600
  29. database:
  30. # 数据库类型 mysql, sqlite3, postgres, sqlserver
  31. # sqlserver: sqlserver://用户名:密码@地址?database=数据库名
  32. driver: mysql
  33. # 数据库连接字符串 mysql 缺省信息 charset=utf8&parseTime=True&loc=Local&timeout=1000ms
  34. source: root:pg3mfWRtYonekZWB@tcp(172.24.100.101:31511)/observe?charset=utf8&parseTime=True&loc=Local&timeout=10000ms
  35. # databases:
  36. # 'locaohost:8000':
  37. # driver: mysql
  38. # # 数据库连接字符串 mysql 缺省信息 charset=utf8&parseTime=True&loc=Local&timeout=1000ms
  39. # source: user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=Local&timeout=1000ms
  40. # registers:
  41. # - sources:
  42. # - user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=Local&timeout=1000ms
  43. gen:
  44. # 代码生成读取的数据库名称
  45. dbname: observe
  46. # 代码生成是使用前端代码存放位置,需要指定到src文件夹,相对路径
  47. frontpath: ../go-admin-ui/src
  48. cache:
  49. redis:
  50. addr: 172.24.100.101:30079
  51. password:
  52. gGY16H69Wjr6
  53. # db: 2
  54. # key存在即可
  55. memory: ""
  56. queue:
  57. memory:
  58. poolSize: 100
  59. # redis:
  60. # addr: 127.0.0.1:6379
  61. # password: xxxxxx
  62. # producer:
  63. # streamMaxLength: 100
  64. # approximateMaxLength: true
  65. # consumer:
  66. # visibilityTimeout: 60
  67. # bufferSize: 100
  68. # concurrency: 10
  69. # blockingTimeout: 5
  70. # reclaimInterval: 1
  71. locker:
  72. redis:
  73. addr: 127.0.0.1:36379
  74. extend: # 扩展配置
  75. prometheus:
  76. address: http://prometheus.cestong.com.cn
  77. olapdb:
  78. driver: clickhouse
  79. addr: 172.24.100.101:30367
  80. debug: true
  81. database: otel
  82. username: default
  83. password: cecf@cestong.com
  84. maxOpenConns: 10
  85. maxIdleConns: 5
  86. kafka:
  87. brokers:
  88. - 172.24.100.101:30400
  89. - 172.24.100.101:30401
  90. - 172.24.100.101:30402
  91. topic: otel
  92. consumers: 3
  93. maxConcurrency: 20
  94. # metricsGroupId: "observe-consumer-metrics-group"
  95. otel:
  96. common:
  97. serviceName: "observe-server"
  98. serviceVersion: "1.0.0"
  99. endpoint: otel-collector.cestong.com.cn:80
  100. metrics:
  101. # endpoint: http://otel-collector.cestong.com.cn/v1/metrics
  102. endpoint: otel-collector.cestong.com.cn:80
  103. interval: 60 # 收集间隔,60s
  104. smsconfig:
  105. appKey: "95598109"
  106. appSecret: "VXX8H0MzT7"
  107. url: "http://msa.zs.test.js.sgcc.com.cn/jssms/api/sendsmsbatch"
  108. appsGroup: "opentelemetry-demo:18611342234,18722341127;demo:18511342234,18622341127"
  109. smsTpl: "【江苏省电力公司\n所属系统:{{app_alias}}\n事件名称:{{events_name}}\n事件创建时间:{{date_time}}\n事件描述:{{events}}"
  110. # sqlRecord: False