当前位置:网站首页>添加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},整个表达式需要用括号()扩住。所以添加表达式的时候可以把整个表达式都用()扩住,不管是否有宏定义。
边栏推荐
- Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
- 金属有机骨架材料ZIF-8包载姜黄素([email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂
- JS get DPI, PX to cm, cm to PX
- JVM object lifecycle
- Folic acid modified metal organic framework (zif-8) baicalin loaded metal organic framework composite magnetic material (AU- [email
- JS Part III
- 7-11 calculation of residential water charges by sections
- Exercise 6-2 using functions to sum special A-string sequences
- 好看、好用、强大的手写笔记软件综合评测:Notability、GoodNotes、MarginNote、随手写、Notes Writers、CollaNote、CollaNote、Prodrafts、Noteshelf、FlowUs、OneNote、苹果备忘录
- 28:第三章:开发通行证服务:11:在配置文件中定义属性,然后在代码中去获取;
猜你喜欢

JS matrix zero

Exercise 8-7 string sorting

Exercise 6-2 using functions to sum special A-string sequences
[email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂"/>金属有机骨架材料ZIF-8包载姜黄素([email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂

Configure stylelint

npm install卡住与node-npy的各种奇怪报错

中感微冲刺科创板:年营收2.4亿净亏1782万 拟募资6亿

玖逸云黑免费无加密版本源码

Global event bus

交联环糊精金属有机骨架负载甲氨蝶呤缓释微粒|金属-有机多孔材料UiO-66负载黄酮苷类药物|齐岳
随机推荐
【吉林大学】考研初试复试资料分享
js 2023. String pair equal to the target string after connection
GRPC的四种数据流以及案例
TS code automatically generates JS
战略、战术(和 OKR)
Exercise 6-2 using functions to sum special A-string sequences
Why don't I have a rookie medal
MongoDB索引
Redis: redis data structure and key operation commands
PCB中常用快捷键
C language,%d% Difference between 2D%2d%02d
Fabric. JS document
Simulated access
Article content typesetting and code highlighting
2021年区域赛ICPC沈阳站J-Luggage Lock(代码简洁)
QT learning 20 standard dialog box in QT (middle)
QT learning 17 dialog box and its types
etcd集群权限管理和账号密码使用
6-9 statistics of single digits (15 points)
Interface for querying IP home