Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表达式有哪些呢? #180

Open
hudingwen opened this issue Jul 20, 2022 · 4 comments
Open

表达式有哪些呢? #180

hudingwen opened this issue Jul 20, 2022 · 4 comments

Comments

@hudingwen
Copy link

{
"name": "you can parse an expression combining any known field",
"rule": "load_5>10",
"interval": 1800,
"callback": "https://yourSMSurl"
}
我看你说任意已知表达式
表达式关键词列表我没看到呢?我想监控磁盘和宕机

@cppla
Copy link
Owner

cppla commented Jul 21, 2022

eval表达式都支持。回头整个wiki吧,非程序员好像不太清楚这个eval怎么用。

字段:https://tz.cloudcpp.com/json/stats.json 客户端传回的字段都支持。

eg: 磁盘容量实用率超过95

(hdd_used/hdd_total)*100>95

eg:ipv4宕机示例

online4=0

eg:ipv6宕机示例

online6=0

eg:ipv4 和 ipv6一起监控宕机示例

online4=0&online6=0

@paulzzh
Copy link
Contributor

paulzzh commented Jul 26, 2022

https://github.com/ArashPartow/exprtk
可以看看SECTION 01和SECTION 02

@xulinbao
Copy link

你好,请问有没有apache,fpm,redis,这些表达式

@cppla
Copy link
Owner

cppla commented Oct 28, 2022

这些表达式是指客户端回传过来的json字段: https://tz.cloudcpp.com/json/stats.json

如果你自己定制化客户端,应该是可以的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants