appstore/apps/amprobe/latest/data/configs/config.dev.toml
2024-05-10 23:54:24 +08:00

78 lines
1.6 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[Fiber]
# http监听地址
Host = "0.0.0.0"
# http监听端口
Port = 8000
# http优雅关闭等待超时时长(单位秒)
ShutdownTimeout = 30
SeverHeader = "probe"
AppName = "probe"
Prefork = false
# 数据库文件存放位置的配置
# 需要监控的磁盘设备配置
# 定时任务执行间隔配置
[Gorm]
# 是否开启调试模式
Debug = true
# 数据库类型(目前支持的数据库类型postgres)
DBType = "sqlite"
# 设置连接可以重用的最长时间(单位:秒)
MaxLifetime = 7200
# 设置数据库的最大打开连接数
MaxOpenConns = 150
# 设置空闲连接池中的最大连接数
MaxIdleConns = 50
# 数据库表名前缀
TablePrefix = "s_"
# 是否启用自动映射数据库表结构
EnableAutoMigrate = true
[DB]
# 连接地址
Host = ""
# 连接端口
Port = ""
# 用户名
User = ""
# 密码
Password = ""
# 数据库
DBName = "/Users/amu/Desktop/amprobe"
# SSL模式
SSLMode = ""
[Disk]
# 需要监控的磁盘设备,可以根据 lsblk 命令查看
Devices = ["disk3s1s1"]
[Ethernet]
# 需要监控的网口,可以通过 ifconfig 命令查看
Names = ["en0"]
[Task]
# 主机监控数据的采集频率
Interval = 30 # 单位 s
[Logger]
File = "/Users/amu/Desktop/probe.log"
Level = "debug"
RotationTime = "1" # 每天切分一个日志文件
MaxAge = "7" # 最多保留 7 天的日志
[Auth]
# 是否启用
Enable = true
# 签名方式(支持HS512/HS384/HS512)
SigningMethod = "HS512"
# 签名key
SigningKey = "amprobe"
# 过期时间(单位秒)
Expired = 7200
# key 前缀
Prefix = "auth_"
[InitData]
Enable = true
InitConfigFile = "./configs/init.yaml"