1 Star 0 Fork 3

harris/tl-ops-manage

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
tl_ops_manage_env.lua 5.55 KB
一键复制 编辑 原始数据 按行查看 历史
tsm 提交于 2022-08-20 17:19 . feat: 支持耗时统计告警插件
local ROOT_PATH = "/path/to/tl-ops-manage/"
return {
path = {
--[[
en :Console path setting, the page forwarding plugin will use this path for path matching
zn :控制台路径设置,页面转发插件会将此路径用于路径匹配
]]
tlopsmanage = ROOT_PATH .. "web/",
--[[
en :The official website path setting, the page forwarding plugin
will use this path for path matching
zn :官网路径设置,页面转发插件会将此路径用于路径匹配
]]
website = ROOT_PATH .. "website/",
--[[
en :log output directory, all module logs will be output to this directory
zn :日志输出目录,所有模块的日志都将输出到此目录下
]]
log = ROOT_PATH,
--[[
en :data storage directory, the directory where the module data is stored
zn :数据存放目录,模块的数据存放的目录
]]
store = ROOT_PATH .. "store/",
},
log = {
--[[
en :log level, please be careful not to enable debug level logs
in the production environment, it will greatly affect the performance.
zn :日志等级, 注意请不要在生产环境开启调试级别日志,十分影响性能。
]]
level = 1,
--[[
en :log formatting. Turning this option on will take up more disk space.
It is recommended to turn off this option in a production environment
zn :日志格式化,开启此选项会占用更多磁盘空间,生产环境推荐关闭此选项
]]
format_json = true,
},
cache = {
--[[
en : enable custom L2 cache, currently supports options [redis], [none],
[none] means close L2 cache
Supports custom extended cache implementations, such as etcd, mysql, etcd.
zn :开启自定义二级缓存,目前支持选项 【redis】, 【none】, 【none】表示不开启二级缓存
支持自定义扩展缓存实现,如etcd,mysql等。
]]
cus = "none"
},
balance = {
--[[
en :load counter, after this option is enabled, every time nginx is started,
a timer will be enabled to count the load requests within a certain period of time
The time interval is configured in 'constant.tl_ops_constant_balance.count.interval'
Notice: Do not set the statistical time interval too short, which may affect performance.
zn :负载统计器,开启此选项后,将在每次启动nginx时,将开启定时器统计一定时间段内的负载请求情况
时间间隔在‘constant.tl_ops_constant_balance.count.interval’进行配置
注意:统计时间间隔不要设置过短,可能会影响性能。
]]
counting = true,
--[[
en :load current limiter. After this option is enabled, a current limiter will be
connected to the load balancing module. If you need to access current limit,
it is recommended to enable this option
zn :负载限流器,开启此选项后,将在负载均衡模块接入限流器。如果需要接入限流,推荐开启此选项
]]
limiter = true,
},
waf = {
--[[
en :waf filtering, after this option is enabled, all traffic will be cleaned according
to the configuration rules, it is recommended to enable
zn :waf过滤,开启此选项后,将根据配置规则对所有流量进行清洗,推荐开启
]]
open = true,
--[[
en :waf filter statistic, after this option is enabled, every time nginx is started,
a timer will be enabled to count the waf filter requests within a certain period of time
The time interval is configured in 'constant.tl_ops_constant_waf.count.interval'
Notice: Do not set the statistical time interval too short, which may affect performance.
zn :waf过滤统计器,开启此选项后,将在每次启动nginx时,将开启定时器统计一定时间段内的waf过滤请求情况
时间间隔在‘constant.tl_ops_constant_waf.count.interval’进行配置
注意:统计时间间隔不要设置过短,可能会影响性能。
]]
counting = true,
},
plugin = {
--[[
en :plugins, when this option is turned on, the added plugins will be enabled
zn :插件,开启此选项后,将在启动时加载添加的所有插件
]]
open = true,
--[[
en :plugin module definition, the imported plugin needs to be defined here before it can be loaded.
Otherwise it will not take effect
Notice: the order in which plugins are filled in will affect the order in which the same plugin stages are executed
zn :插件模块定义,引入的插件需要在此定义好才能被加载。否则将不生效。注意,插件填写的顺序将影响相同插件阶段执行的顺序
]]
module = {
"ssl", "sync", "sync_cluster", "page_proxy", "time_alert",
-- "auth", "cors", "log_analyze", "tracing"
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Lua
1
https://gitee.com/harrishuang/tl-ops-manage.git
git@gitee.com:harrishuang/tl-ops-manage.git
harrishuang
tl-ops-manage
tl-ops-manage
main

搜索帮助