当前位置:网站首页>zabbix监控系统自定义监控内容
zabbix监控系统自定义监控内容
2022-07-04 07:37:00 【拥抱云原生】
zabbix自定义监控内容
自定义监控服务器登陆的人数
需求:限制登陆人数不超过三个,超过三个就发出报警信息
zabbix自定义key(命令行)
1.zabbix主机监控默认通过模板自带了一些key(监控项)
服务端查看:
[[email protected] ~]# zabbix_get -s '192.168.10.51' -p 10050 -k 'system.hostname'
zabbix-agent1
[[email protected] ~]# zabbix_get -s '192.168.10.51' -p 10050 -k 'system.uname'
Linux zabbix-agent1 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64
2.但有一些内容我们想监控而默认没有监控,我们通过key查看不了
[[email protected] ~]# zabbix_get -s '192.168.10.51' -p 10050 -k 'login.user'
ZBX_NOTSUPPORTED: Unknown metric login.agent
3.因此我们可以自定义key(自定义监控的内容)
客户端添加key:
[[email protected] ~]# cat /etc/zabbix/zabbix_agent2.d/login_agent.conf
UserParameter=login.user,who|wc -l
4.创建完成后,重新启动服务、
[[email protected] ~]# systemctl restart zabbix-agent2
5.服务端再次测试是否可以使用该key
[[email protected] ~]# zabbix_get -s '192.168.10.51' -p 10050 -k 'login.user'
1
在页面添加zabbix-server的自定义监控项模板
添加流程:
- 创建模板
- 创建应用集(好比是一个文件夹,里面存放一堆监控项)
- 创建监控项,自定义item(具体想监控的内容)
- 创建触发器,当监控项获取到值的时候,进行和触发器比较、判断、决定是否报警
- 创建图形
- 将具体的主机和该模板连接,关联
找到刚才创建的模板,点击
以上全部创建完成后,与主机进行关联
边栏推荐
- BUUCTF(3)
- L1-030 one gang one (15 points)
- 在所有SwiftUI版本(1.0-4.0)中原生实现Charts图表视图之思路
- Preliminary study on temporal database incluxdb 2.2
- Zephyr 學習筆記2,Scheduling
- 手写简易版flexible.js以及源码分析
- Rapidjson reading and writing JSON files
- The crackdown on Huawei prompted made in China to join forces to fight back, and another enterprise announced to invest 100 billion in R & D
- Zephyr 学习笔记1,threads
- 电子协会 C语言 1级 34 、分段函数
猜你喜欢
两年前美国芯片扭捏着不卖芯片,如今芯片堆积如山祈求中国帮忙
NLP literature reading summary
Routing decorator of tornado project
Book list | as the technical support Party of the Winter Olympics, Alibaba cloud's technology is written in these books!
大学阶段总结
提升复杂场景三维重建精度 | 基于PaddleSeg分割无人机遥感影像
MySQL中的文本處理函數整理,收藏速查
Zephyr study notes 2, scheduling
JVM中堆概念
PCIE知识点-010:PCIE 热插拔资料从哪获取
随机推荐
L1-030 one gang one (15 points)
The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native
MYCAT middleware installation and use
This monitoring system can monitor the turnover intention and fishing all, and the product page has 404 after the dispute appears
神经网络入门(下)
Zephyr 学习笔记2,Scheduling
Zephyr Learning note 2, Scheduling
两年前美国芯片扭捏着不卖芯片,如今芯片堆积如山祈求中国帮忙
Data double write consistency between redis and MySQL
Zabbix agent主动模式的实现
User login function: simple but difficult
MySQL中的文本處理函數整理,收藏速查
It's healthy to drink medicinal wine like this. Are you drinking it right
Valentine's Day is coming! Without 50W bride price, my girlfriend was forcibly dragged away...
SQL注入测试工具之Sqli-labs下载安装重置数据库报错解决办法之一(#0{main}thrown in D:\Software\phpstudy_pro\WWW\sqli-labs-……)
Used on windows Bat file startup project
时序数据库 InfluxDB 2.2 初探
[FreeRTOS] FreeRTOS learning notes (7) - handwritten FreeRTOS two-way linked list / source code analysis
Literature collation and thesis reading methods
谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展