cm-settings.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: ob-server-settings
  5. namespace: observe
  6. data:
  7. settings.yaml: |
  8. server:
  9. http:
  10. addr: 0.0.0.0:8000
  11. timeout: 100s
  12. jwt:
  13. secret: hFj50izBbnDK1UFueTHh
  14. debug: true
  15. grpc:
  16. addr: 0.0.0.0:9000
  17. timeout: 1s
  18. data:
  19. mysql:
  20. driver: mysql
  21. source: root:pg3mfWRtYonekZWB@tcp(mysql-primary.observe.svc.cluster.local:3306)/observe?charset=utf8mb4&parseTime=True&loc=Local
  22. mysqlro:
  23. driver: mysql
  24. source: root:pg3mfWRtYonekZWB@tcp(mysql-secondary.observe.svc.cluster.local:3306)/observe?charset=utf8mb4&parseTime=True&loc=Local
  25. # source: root:pg3mfWRtYonekZWB@tcp(mysql-primary.observe.svc.cluster.local:3306)/observe?charset=utf8mb4&parseTime=True&loc=Local
  26. clickhouse:
  27. driver: clickhouse
  28. source: clickhouse://default:cecf@cestong.com@clickhouse.observe.svc.cluster.local:9000/otel?dial_timeout=10s&max_execution_time=60
  29. redis:
  30. addr: redis-headless.observe.svc.cluster.local:6379
  31. password: gGY16H69Wjr6
  32. read_timeout: 0.2s
  33. write_timeout: 0.2s
  34. otel:
  35. exporter:
  36. endpoint: otel-collector-opentelemetry-collector.observe.svc.cluster.local:4318
  37. # endpoint: ""
  38. settings:
  39. application:
  40. mode: test
  41. host: 0.0.0.0
  42. name: testApp
  43. port: 8000 # 服务端口号
  44. readtimeout: 1
  45. writertimeout: 2
  46. enabledp: false
  47. logger:
  48. path: temp/logs
  49. stdout: '' #控制台日志,启用后,不输出到文件
  50. # level: trace
  51. level: info
  52. enableddb: false
  53. jwt:
  54. secret: hFj50izBbnDK1UFueTHh
  55. timeout: 3600
  56. database:
  57. driver: mysql
  58. source: root:pg3mfWRtYonekZWB@tcp(mysql-primary.observe.svc.cluster.local:3306)/observe?charset=utf8&parseTime=True&loc=Local&timeout=1000ms
  59. databases:
  60. '*':
  61. driver: mysql
  62. # source: root:pg3mfWRtYonekZWB@tcp(103.29.16.7:31511)/observe?charset=utf8&parseTime=True&loc=Local&timeout=10000ms
  63. source: root:pg3mfWRtYonekZWB@tcp(mysql-primary.observe.svc.cluster.local:3306)/observe?charset=utf8&parseTime=True&loc=Local&timeout=1000ms
  64. 'pg':
  65. driver: postgres
  66. # source: "host=103.29.16.7 user=postgres password=cecf@cestong.com dbname=ob_metrics port=32169 sslmode=disable TimeZone=Asia/Shanghai"
  67. source: "host=timescaledb.db.svc.cluster.local user=postgres password=cecf@cestong.com dbname=ob_metrics port=5432 sslmode=disable TimeZone=Asia/Shanghai"
  68. 'ck':
  69. driver: clickhouse
  70. # source: "clickhouse://default:cecf@cestong.com@103.29.16.7:30367/otel?dial_timeout=10s&max_execution_time=60"
  71. source: clickhouse://default:cecf@cestong.com@clickhouse.observe.svc.cluster.local:9000/otel?dial_timeout=10s&max_execution_time=60
  72. gen:
  73. dbname: dbname
  74. frontpath: ../go-admin-ui/src
  75. cache:
  76. memory: ''
  77. redis:
  78. # addr: 101.201.227.126:30079
  79. addr: redis-headless.observe.svc.cluster.local:6379
  80. password: gGY16H69Wjr6
  81. queue:
  82. memory:
  83. poolSize: 100
  84. locker:
  85. redis:
  86. extend: # 扩展配置
  87. clickhouseMetrics: true
  88. olapdb:
  89. driver: clickhouse
  90. addr: clickhouse.observe.svc.cluster.local:9000
  91. debug: true
  92. database: otel
  93. username: default
  94. password: cecf@cestong.com
  95. maxOpenConns: 10
  96. maxIdleConns: 5
  97. kafka:
  98. brokers:
  99. - kafka-broker-headless.observe.svc.cluster.local:9092
  100. #- 172.24.100.101:32400
  101. #- 172.24.100.101:32401
  102. #- 172.24.100.101:32402
  103. #- 101.201.227.126:32402
  104. topic: otelproto
  105. consumers: 6
  106. maxConcurrency: 100
  107. prometheus:
  108. address: http://prometheus-server.observe.svc.cluster.local:80
  109. otel:
  110. common:
  111. serviceName: "observe-server"
  112. serviceVersion: "1.0.0"
  113. # endpoint: otel-collector.cestong.com.cn:80
  114. endpoint: otel-collector-opentelemetry-collector.observe.svc.cluster.local:4318
  115. grpcEndpoint: otel-collector-opentelemetry-collector.observe.svc.cluster.local:4317
  116. metrics:
  117. interval: 60 # 收集间隔,60s
  118. smsconfig:
  119. appKey: "95598109"
  120. appSecret: "VXX8H0MzT7"
  121. url: "http://msa.zs.test.js.sgcc.com.cn/jssms/api/sendsmsbatch"
  122. appsGroup: "opentelemetry-demo:18611342234,18722341127;demo:18511342234,18622341127"
  123. smsTpl: "所属系统:{{app_name}}\n事件名称:{{events_name}}\n事件创建时间:{{date_time}}\n事件描述:{{events}}"
  124. sqlRecord: true