config.yaml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. server:
  2. address: ":8080"
  3. serverRoot: "resource/public"
  4. dumpRouterMap: true
  5. routeOverWrite: true
  6. openapiPath: "/api.json"
  7. swaggerPath: "/swagger"
  8. NameToUriType: 3
  9. maxHeaderBytes: "20KB"
  10. clientMaxBodySize: "50MB"
  11. # Logging配置
  12. logPath: "resource/log/server" # 日志文件存储目录路径,建议使用绝对路径。默认为空,表示关闭
  13. logStdout: true # 日志是否输出到终端。默认为true
  14. errorStack: false # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true
  15. errorLogEnabled: true # 是否记录异常日志信息到日志中。默认为true
  16. errorLogPattern: "error-{Ymd}.log" # 异常错误日志文件格式。默认为"error-{Ymd}.log"
  17. accessLogEnabled: true # 是否记录访问日志。默认为false
  18. accessLogPattern: "access-{Ymd}.log" # 访问日志文件格式。默认为"access-{Ymd}.log"
  19. logger:
  20. path: "resource/log/run"
  21. file: "{Y-m-d}.log"
  22. level: "all"
  23. stdout: true
  24. # Database.
  25. database:
  26. logger:
  27. level: "all"
  28. stdout: true
  29. Path: "resource/log/sql"
  30. default:
  31. link: "mysql:nodemonitor:m4A6zLaDnRCNd4xw@tcp(166.88.61.180:33060)/nodemonitor?loc=Local&parseTime=true" #156.234.193.212
  32. #link: "mysql:root:123456@tcp(127.0.0.1:3306)/nodeMonitor?loc=Local&parseTime=true"
  33. debug: false
  34. charset: "utf8mb4" #数据库编码
  35. dryRun: false #空跑
  36. maxIdle: 10 #连接池最大闲置的连接数
  37. maxOpen: 30 #连接池最大打开的连接数
  38. maxLifetime: 30 #(单位秒)连接对象可重复使用的时间长度
  39. node:
  40. startTime: 15 #用于查询15分钟内的数据 单位分钟
  41. taskName: "ping_task" #任务名称
  42. taskStatusName: "ping_status_task" #任务名称
  43. nodePing: 0 #用于表示是不是检测PING的节点
  44. taskStatusTime: 30 #单位分钟
  45. rootUsername: "admin"
  46. rootPassword: "qoqoiwooqp@#"
  47. clearLogTime: 10 #清理10天前的数据
  48. telegramKey: "5676192709:AAFxU96iBHZwJpF9F67f0ARjketvb9rnPzg"
  49. telegramUserID: "1001893783262"
  50. gfToken:
  51. cacheKey: "gfToken_"
  52. timeOut: 10800
  53. maxRefresh: 5400
  54. multiLogin: true
  55. encryptKey: "49c54195e750b04e74a8429b17896586"
  56. cacheModel: "redis"
  57. excludePaths:
  58. - "/api/v1/auth/login"
  59. - "/api/v1/auth/loginout"
  60. - "/api/v1/node/add"
  61. # Redis 配置示例
  62. redis:
  63. # 单实例配置
  64. default:
  65. address: 127.0.0.1:6379
  66. db: 1
  67. idleTimeout: 600
  68. maxActive: 100
  69. #system:
  70. # notCheckAuthAdminIds: [1, 2, 31] #无需验证后台权限的用户id
  71. # dataDir: "./resource/data"
  72. # cache:
  73. # model: "redis" #缓存模式 memory OR redis
  74. # prefix: "liarCache_" #缓存前缀
  75. ##casbin配置
  76. #casbin:
  77. # modelFile: "./resource/casbin/rbac_model.conf"
  78. # policyFile: "./resource/casbin/rbac_policy.csv"