settings.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. '*':
  37. driver: mysql
  38. source: root:pg3mfWRtYonekZWB@tcp(172.24.100.101:31511)/observe?charset=utf8&parseTime=True&loc=Local&timeout=10000ms
  39. 'pg':
  40. driver: postgres
  41. source: "host=172.24.100.101 user=postgres password=cecf@cestong.com dbname=ob_metrics port=32168 sslmode=disable TimeZone=Asia/Shanghai"
  42. 'ck':
  43. driver: clickhouse
  44. source: "clickhouse://default:cecf@cestong.com@172.24.100.101:30367/otel?dial_timeout=10s&max_execution_time=60"
  45. gen:
  46. # 代码生成读取的数据库名称
  47. dbname: observe
  48. # 代码生成是使用前端代码存放位置,需要指定到src文件夹,相对路径
  49. frontpath: ../go-admin-ui/src
  50. cache:
  51. redis:
  52. addr: 172.24.100.101:30079
  53. password:
  54. gGY16H69Wjr6
  55. # db: 2
  56. # key存在即可
  57. memory: ""
  58. queue:
  59. memory:
  60. poolSize: 100
  61. # redis:
  62. # addr: 127.0.0.1:6379
  63. # password: xxxxxx
  64. # producer:
  65. # streamMaxLength: 100
  66. # approximateMaxLength: true
  67. # consumer:
  68. # visibilityTimeout: 60
  69. # bufferSize: 100
  70. # concurrency: 10
  71. # blockingTimeout: 5
  72. # reclaimInterval: 1
  73. locker:
  74. redis:
  75. addr: 127.0.0.1:36379
  76. extend: # 扩展配置
  77. prometheus:
  78. address: http://prometheus.cestong.com.cn
  79. olapdb:
  80. driver: clickhouse
  81. addr: 172.24.100.101:30367
  82. debug: true
  83. database: otel
  84. username: default
  85. password: cecf@cestong.com
  86. maxOpenConns: 10
  87. maxIdleConns: 5
  88. kafka:
  89. brokers:
  90. - 172.24.100.101:30400
  91. - 172.24.100.101:30401
  92. - 172.24.100.101:30402
  93. topic: otel
  94. consumers: 3
  95. maxConcurrency: 20
  96. # metricsGroupId: "observe-consumer-metrics-group"
  97. otel:
  98. common:
  99. serviceName: "observe-server"
  100. serviceVersion: "1.0.0"
  101. endpoint: otel-collector.cestong.com.cn:80
  102. metrics:
  103. # endpoint: http://otel-collector.cestong.com.cn/v1/metrics
  104. endpoint: otel-collector.cestong.com.cn:80
  105. interval: 60 # 收集间隔,60s
  106. smsconfig:
  107. appKey: "95598109"
  108. appSecret: "VXX8H0MzT7"
  109. url: "http://msa.zs.test.js.sgcc.com.cn/jssms/api/sendsmsbatch"
  110. appsGroup: "opentelemetry-demo:18611342234,18722341127;demo:18511342234,18622341127"
  111. smsTpl: "所属测试系统:{{app_name}}\n事件名称:{{events_name}}\n事件创建时间:{{date_time}}\n事件描述:{{events}}"
  112. sqlRecord: true