Comments (8)
网络波动导致的错误宕机告警已经解决
docker pull cppla/serverstatus:latest
from serverstatus.
我用你最新代码编译一样不行,其实你改动那块去掉rule拼接对我应该也没啥影响,我用的是telegram的bot,按你的说法,转义应该不存在
from serverstatus.
之前那个是别人提的被你关闭了,我看了你提交的改动和源码 你的改动意思是把rule从拼接串里面去掉对吧 然后你的这段代码 symbol_table_t symbol_table; symbol_table.add_variable("load_1",load_1); symbol_table.add_variable("load_5",load_5); symbol_table.add_variable("load_15",load_15); symbol_table.add_variable("ping_10010",ping_10010); symbol_table.add_variable("ping_189",ping_189); symbol_table.add_variable("ping_10086",ping_10086); symbol_table.add_variable("time_10010",time_10010); symbol_table.add_variable("time_189",time_189); symbol_table.add_variable("time_10086",time_10086); symbol_table.add_variable("tcp_count",tcp_count); symbol_table.add_variable("udp_count",udp_count); symbol_table.add_variable("process_count",process_count); symbol_table.add_variable("thread_count",thread_count); symbol_table.add_variable("network_rx",network_rx); symbol_table.add_variable("network_tx",network_tx); symbol_table.add_variable("network_in",network_in); symbol_table.add_variable("network_out",network_out); symbol_table.add_variable("memory_total",memory_total); symbol_table.add_variable("memory_used",memory_used); symbol_table.add_variable("swap_total",swap_total); symbol_table.add_variable("swap_used",swap_used); symbol_table.add_variable("hdd_total",hdd_total); symbol_table.add_variable("hdd_used",hdd_used); symbol_table.add_variable("io_read",io_read); symbol_table.add_variable("io_write",io_write); symbol_table.add_variable("cpu",cpu); symbol_table.add_variable("online4",online4); symbol_table.add_variable("online6",online6); symbol_table.add_constants();
expression_t expression; expression.register_symbol_table(symbol_table); parser_t parser; parser.compile(expression_string,expression); if (expression.value() > 0)
是不是没有添加进username和name这些固定字段?所以才导致&username=xxx这种不会匹配到规则导致失效?
symbol_table.add_constants(); 这个我不是很懂,我不是写c的我只是会点Java,如果这个里面是加入那些固定值的操作,那我着实找不着原因了
这个是表达式断言,现在不支持静态字符串,只支持数学表达式。例如int / float /double 以及数学变量 等是支持的。
下个版本我看看怎么解决。
from serverstatus.
那看来有点难搞,要么换个支持的,要么自己解析?
把字符串的单独抽出去,提前分组,机器有id,表达式也搞个id,一对多映射怎么样
from serverstatus.
那看来有点难搞,要么换个支持的,要么自己解析? 把字符串的单独抽出去,提前分组,机器有id,表达式也搞个id,一对多映射怎么样
对,难倒是不难,然而C++开发周期比较长费时间
from serverstatus.
exprtk最新版本已经支持静态字符串参与计算,1.1.1 已经添加该功能,可以测试下。@ztdt
from serverstatus.
好的谢谢,等我有空的时候升级下试试
from serverstatus.
Exprtk库默认使用窄字符类型,中文等Unicode字符无法解析计算,等待修复
from serverstatus.
Related Issues (20)
- 可否修改刷新时间以节约流量? HOT 1
- 能否指定 推送/不推送 特定机器的watchdog消息呢? HOT 5
- 请问client-psutil.py, 的SERVER地址,username帐号, password密码到底是哪里的帐号密码? HOT 3
- docker 部署服务宕机不触发告警 HOT 3
- 配置了config.json但是全是断线状态 HOT 1
- 联通延迟测试是不是掉了呀 HOT 7
- 指定网卡 HOT 1
- 显示OS和kernel HOT 1
- 关于延时的逻辑判断 HOT 12
- 流量重置的日期异常 HOT 16
- 突然所有客户端都连不上了,求问大佬如何排查 HOT 1
- 大佬能不能加个总流量的功能? HOT 1
- 请问watchdog要怎麽设置啊? HOT 1
- 关于测速和丢包 HOT 5
- 如何增加服务器显示数量? HOT 1
- vps和域名申请了证书,如何让他https访问? HOT 1
- 服务端和客户端一直连不上 HOT 3
- 请问是否可以在面板上加入月流量统计
- 1.1.2算发布了吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverstatus.