当前位置:网站首页>添加Zabbix计算类型项目Calculated items
添加Zabbix计算类型项目Calculated items
2022-07-03 13:53:00 【星哥玩云】
通过Redis自带的info命令可以监控keyspace_hits和keyspace_misses这两个值,但是redis的命中率不能直接获取,可以通过zabbix的calculated items实现监控redis的命中率
https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/calculated
zabbix从1.8.1开始支持这个功能
在新建item时,需要选择type为Calculated。
在Key一栏填入新key的名称
在Formula栏填入新key的计算表达式
func(<key>|<hostname:key>,<parameter1>,<parameter2>,...)
func是https://www.zabbix.com/documentation/2.2/manual/appendix/triggers/functions 文档中所支持的函数
key 是需要使用到的其他item,最好用双引号""将key值扩住,如果key值中间有引号需要用\转义。
parameter 需要使用的其他参数
示例:
1.zabbix计算最近的磁盘空余空间和磁盘总空间的比率。
100*last("vfs.fs.size[/,free]",0)/last("vfs.fs.size[/,total]",0)
2.计算平均10分钟内zabbix处理的值
avg("Zabbix Server:zabbix[wcache,values]",600)
计算类型的item,如果获取间隔时间过长会影响zabbix server的性能
3.计算eth0总的带宽
last("net.if.in[eth0,bytes]",0)+last("net.if.out[eth0,bytes]",0)
4.计算入口流量的比例
100*last("net.if.in[eth0,bytes]",0)/(last("net.if.in[eth0,bytes]",0)+last("net.if.out[eth0,bytes]",0))
5.
last("grpsum[\"video\",\"net.if.out[eth0,bytes]\",\"last\",\"0\"]",0) / last("grpsum[\"video\",\"nginx_stat.sh[active]\",\"last\",\"0\"]",0)
经过测试如果Formula表达式内有宏定义如{#REDISPORT},整个表达式需要用括号()扩住。所以添加表达式的时候可以把整个表达式都用()扩住,不管是否有宏定义。
边栏推荐
- 小项目(servelt+jsp+mysql+EL+JSTL)完成一个登录功能的Servlet,具有增删改查的操作。实现登录身份验证,防止非法登录,防止多点登录,记住用户名密码功能。
- Redis: commandes d'action pour les données de type chaîne
- fpga阻塞赋值和非阻塞赋值
- QT learning 22 layout manager (I)
- 泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
- JS shift operators (< <,> > and > > >)
- QT learning 24 layout manager (III)
- 金属有机骨架MIL-88负载阿霉素DOX|叶酸修饰UiO-66-NH2负载阿霉素[email protected]纳米粒子
- Redis:字符串類型數據的操作命令
- Simulated access
猜你喜欢

Leetcode (4) -- find the median of two positively ordered arrays

JVM object lifecycle
[email"/>Folic acid modified metal organic framework (zif-8) baicalin loaded metal organic framework composite magnetic material (AU- [email

Programmable logic device software testing

JS first summary

Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride(

Redis: commandes d'action pour les données de type chaîne

Exercise 10-3 recursive implementation of exponential functions

Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)

QT learning 24 layout manager (III)
随机推荐
1px problem of mobile terminal
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
全局事件总线
JS download files through URL links
Exercise 10-6 recursively find Fabonacci sequence
Too many files with unapproved license
556. 下一个更大元素 III
Toast UI editor (editor allows you to edit your markup document using text or WYSIWYG, with syntax highlighting, scrolling synchronization, real-time preview and chart functions.)
[Jilin University] information sharing of postgraduate entrance examination and re examination
SSH访问控制,多次失败登录即封掉IP,防止暴力破解
28:第三章:开发通行证服务:11:在配置文件中定义属性,然后在代码中去获取;
C language,%d% Difference between 2D%2d%02d
Example analysis of QT learning 18 login dialog box
Reflection -- basic usage
Fabric. JS document
Polestar美股上市:5.5万台交付如何支持得起超200亿美元估值
Redis:Redis的数据结构、key的操作命令
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
LNMP环境mail函数不能发送邮件解决
Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not