2021-11-28 18:57:49 +08:00
|
|
|
# debug, release
|
|
|
|
RunMode = "release"
|
|
|
|
|
|
|
|
# my cluster name
|
|
|
|
ClusterName = "Default"
|
|
|
|
|
2022-03-21 14:13:04 +08:00
|
|
|
# Default busigroup Key name
|
|
|
|
# do not change
|
|
|
|
BusiGroupLabelKey = "busigroup"
|
|
|
|
|
2021-12-01 14:09:08 +08:00
|
|
|
# sleep x seconds, then start judge engine
|
|
|
|
EngineDelay = 120
|
|
|
|
|
2022-05-20 13:13:10 +08:00
|
|
|
DisableUsageReport = false
|
|
|
|
|
2021-11-28 18:57:49 +08:00
|
|
|
[Log]
|
|
|
|
# log write dir
|
|
|
|
Dir = "logs"
|
|
|
|
# log level: DEBUG INFO WARNING ERROR
|
|
|
|
Level = "INFO"
|
|
|
|
# stdout, stderr, file
|
|
|
|
Output = "stdout"
|
|
|
|
# # rotate by time
|
|
|
|
# KeepHours: 4
|
|
|
|
# # rotate by size
|
|
|
|
# RotateNum = 3
|
|
|
|
# # unit: MB
|
|
|
|
# RotateSize = 256
|
|
|
|
|
|
|
|
[HTTP]
|
|
|
|
# http listening address
|
|
|
|
Host = "0.0.0.0"
|
|
|
|
# http listening port
|
|
|
|
Port = 19000
|
|
|
|
# https cert file path
|
|
|
|
CertFile = ""
|
|
|
|
# https key file path
|
|
|
|
KeyFile = ""
|
|
|
|
# whether print access log
|
|
|
|
PrintAccessLog = false
|
|
|
|
# whether enable pprof
|
|
|
|
PProf = false
|
|
|
|
# http graceful shutdown timeout, unit: s
|
|
|
|
ShutdownTimeout = 30
|
|
|
|
# max content length: 64M
|
|
|
|
MaxContentLength = 67108864
|
|
|
|
# http server read timeout, unit: s
|
|
|
|
ReadTimeout = 20
|
|
|
|
# http server write timeout, unit: s
|
|
|
|
WriteTimeout = 40
|
|
|
|
# http server idle timeout, unit: s
|
|
|
|
IdleTimeout = 120
|
|
|
|
|
|
|
|
# [BasicAuth]
|
|
|
|
# user002 = "ccc26da7b9aba533cbb263a36c07dcc9"
|
|
|
|
|
|
|
|
[Heartbeat]
|
|
|
|
# auto detect if blank
|
|
|
|
IP = ""
|
|
|
|
# unit ms
|
|
|
|
Interval = 1000
|
|
|
|
|
2022-02-28 23:50:02 +08:00
|
|
|
[SMTP]
|
|
|
|
Host = "smtp.163.com"
|
|
|
|
Port = 994
|
|
|
|
User = "username"
|
|
|
|
Pass = "password"
|
|
|
|
From = "username@163.com"
|
|
|
|
InsecureSkipVerify = true
|
2022-03-01 13:44:46 +08:00
|
|
|
Batch = 5
|
2022-02-28 23:50:02 +08:00
|
|
|
|
2021-11-28 18:57:49 +08:00
|
|
|
[Alerting]
|
2021-12-23 12:53:32 +08:00
|
|
|
TemplatesDir = "./etc/template"
|
2022-03-01 13:52:03 +08:00
|
|
|
NotifyConcurrency = 10
|
2022-04-14 18:56:14 +08:00
|
|
|
# use builtin go code notify
|
|
|
|
NotifyBuiltinChannels = ["email", "dingtalk", "wecom", "feishu"]
|
2022-02-28 23:50:02 +08:00
|
|
|
|
|
|
|
[Alerting.CallScript]
|
|
|
|
# built in sending capability in go code
|
|
|
|
# so, no need enable script sender
|
|
|
|
Enable = false
|
|
|
|
ScriptPath = "./etc/script/notify.py"
|
2021-11-28 18:57:49 +08:00
|
|
|
|
2022-03-20 10:27:17 +08:00
|
|
|
[Alerting.CallPlugin]
|
|
|
|
Enable = false
|
|
|
|
# use a plugin via `go build -buildmode=plugin -o notify.so`
|
|
|
|
PluginPath = "./etc/script/notify.so"
|
|
|
|
Caller = "n9eCaller"
|
|
|
|
|
2021-11-28 18:57:49 +08:00
|
|
|
[Alerting.RedisPub]
|
|
|
|
Enable = false
|
|
|
|
# complete redis key: ${ChannelPrefix} + ${Cluster}
|
|
|
|
ChannelPrefix = "/alerts/"
|
|
|
|
|
2022-02-28 23:50:02 +08:00
|
|
|
[Alerting.Webhook]
|
2022-02-10 17:32:06 +08:00
|
|
|
Enable = false
|
|
|
|
Url = "http://a.com/n9e/callback"
|
|
|
|
BasicAuthUser = ""
|
|
|
|
BasicAuthPass = ""
|
|
|
|
Timeout = "5s"
|
|
|
|
Headers = ["Content-Type", "application/json", "X-From", "N9E"]
|
|
|
|
|
2021-11-28 18:57:49 +08:00
|
|
|
[NoData]
|
|
|
|
Metric = "target_up"
|
|
|
|
# unit: second
|
|
|
|
Interval = 15
|
|
|
|
|
|
|
|
[Ibex]
|
|
|
|
# callback: ${ibex}/${tplid}/${host}
|
|
|
|
Address = "127.0.0.1:10090"
|
|
|
|
# basic auth
|
|
|
|
BasicAuthUser = "ibex"
|
|
|
|
BasicAuthPass = "ibex"
|
|
|
|
# unit: ms
|
|
|
|
Timeout = 3000
|
|
|
|
|
|
|
|
[Redis]
|
|
|
|
# address, ip:port
|
|
|
|
Address = "127.0.0.1:6379"
|
2022-04-22 21:48:56 +08:00
|
|
|
# Username = ""
|
|
|
|
# Password = ""
|
2021-11-28 18:57:49 +08:00
|
|
|
# DB = 0
|
2022-04-22 21:48:56 +08:00
|
|
|
# UseTLS = false
|
2022-04-22 22:25:02 +08:00
|
|
|
# TLSMinVersion = "1.2"
|
2021-11-28 18:57:49 +08:00
|
|
|
|
2022-05-20 23:48:49 +08:00
|
|
|
[DB]
|
|
|
|
# postgres: host=%s port=%s user=%s dbname=%s password=%s sslmode=%s
|
|
|
|
DSN="root:1234@tcp(127.0.0.1:3306)/n9e_v5?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
|
2021-11-28 18:57:49 +08:00
|
|
|
# enable debug mode or not
|
|
|
|
Debug = false
|
|
|
|
# mysql postgres
|
|
|
|
DBType = "mysql"
|
|
|
|
# unit: s
|
|
|
|
MaxLifetime = 7200
|
|
|
|
# max open connections
|
|
|
|
MaxOpenConns = 150
|
|
|
|
# max idle connections
|
|
|
|
MaxIdleConns = 50
|
|
|
|
# table prefix
|
|
|
|
TablePrefix = ""
|
|
|
|
# enable auto migrate or not
|
2022-05-20 23:48:49 +08:00
|
|
|
# EnableAutoMigrate = false
|
2021-11-28 18:57:49 +08:00
|
|
|
|
|
|
|
[Reader]
|
|
|
|
# prometheus base url
|
|
|
|
Url = "http://127.0.0.1:9090"
|
|
|
|
# Basic auth username
|
|
|
|
BasicAuthUser = ""
|
|
|
|
# Basic auth password
|
|
|
|
BasicAuthPass = ""
|
|
|
|
# timeout settings, unit: ms
|
|
|
|
Timeout = 30000
|
|
|
|
DialTimeout = 10000
|
|
|
|
TLSHandshakeTimeout = 30000
|
|
|
|
ExpectContinueTimeout = 1000
|
|
|
|
IdleConnTimeout = 90000
|
|
|
|
# time duration, unit: ms
|
|
|
|
KeepAlive = 30000
|
|
|
|
MaxConnsPerHost = 0
|
|
|
|
MaxIdleConns = 100
|
|
|
|
MaxIdleConnsPerHost = 10
|
|
|
|
|
|
|
|
[WriterOpt]
|
2022-04-21 12:24:26 +08:00
|
|
|
# queue channel count
|
|
|
|
QueueCount = 100
|
2021-11-28 18:57:49 +08:00
|
|
|
# queue max size
|
2022-04-21 12:24:26 +08:00
|
|
|
QueueMaxSize = 200000
|
2021-11-28 18:57:49 +08:00
|
|
|
# once pop samples number from queue
|
|
|
|
QueuePopSize = 2000
|
|
|
|
|
|
|
|
[[Writers]]
|
|
|
|
Url = "http://127.0.0.1:9090/api/v1/write"
|
|
|
|
# Basic auth username
|
|
|
|
BasicAuthUser = ""
|
|
|
|
# Basic auth password
|
|
|
|
BasicAuthPass = ""
|
|
|
|
# timeout settings, unit: ms
|
|
|
|
Timeout = 30000
|
|
|
|
DialTimeout = 10000
|
|
|
|
TLSHandshakeTimeout = 30000
|
|
|
|
ExpectContinueTimeout = 1000
|
|
|
|
IdleConnTimeout = 90000
|
|
|
|
# time duration, unit: ms
|
|
|
|
KeepAlive = 30000
|
|
|
|
MaxConnsPerHost = 0
|
|
|
|
MaxIdleConns = 100
|
|
|
|
MaxIdleConnsPerHost = 100
|
|
|
|
|
|
|
|
# [[Writers]]
|
|
|
|
# Url = "http://127.0.0.1:7201/api/v1/prom/remote/write"
|
|
|
|
# # Basic auth username
|
|
|
|
# BasicAuthUser = ""
|
|
|
|
# # Basic auth password
|
|
|
|
# BasicAuthPass = ""
|
2021-12-09 23:07:45 +08:00
|
|
|
# # timeout settings, unit: ms
|
2021-11-28 18:57:49 +08:00
|
|
|
# Timeout = 30000
|
|
|
|
# DialTimeout = 10000
|
|
|
|
# TLSHandshakeTimeout = 30000
|
|
|
|
# ExpectContinueTimeout = 1000
|
|
|
|
# IdleConnTimeout = 90000
|
|
|
|
# # time duration, unit: ms
|
|
|
|
# KeepAlive = 30000
|
|
|
|
# MaxConnsPerHost = 0
|
|
|
|
# MaxIdleConns = 100
|
2022-03-20 10:27:17 +08:00
|
|
|
# MaxIdleConnsPerHost = 100
|