当前位置:网站首页>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(具体想监控的内容)
- 创建触发器,当监控项获取到值的时候,进行和触发器比较、判断、决定是否报警
- 创建图形
- 将具体的主机和该模板连接,关联


找到刚才创建的模板,点击






以上全部创建完成后,与主机进行关联


边栏推荐
- Rhcsa day 3
- Chain ide -- the infrastructure of the metauniverse
- [Gurobi] 简单模型的建立
- flask-sqlalchemy 循环引用
- There is no Chinese prompt below when inputting text in win10 Microsoft Pinyin input method
- Experience installing VMware esxi 6.7 under VMware Workstation 16
- University stage summary
- 提升复杂场景三维重建精度 | 基于PaddleSeg分割无人机遥感影像
- Relations courantes de la fiche de données d'exploitation pour les activités
- Used on windows Bat file startup project
猜你喜欢

深入浅出:了解时序数据库 InfluxDB

Unity 从Inspector界面打开资源管理器选择并记录文件路径

Valentine's Day is coming! Without 50W bride price, my girlfriend was forcibly dragged away...

Zephyr 学习笔记1,threads

tornado项目之路由装饰器

socket inet_ pton() inet_ Ntop() function (a new network address translation function, which converts the expression format and numerical format to each other. The old ones are inet_aton(), INET_ ntoa

L2-013 red alarm (C language) and relevant knowledge of parallel search

Zephyr 学习笔记2,Scheduling

Unity opens the explorer from the inspector interface, selects and records the file path

Chain ide -- the infrastructure of the metauniverse
随机推荐
Jianmu continuous integration platform v2.2.2 release
Easy to understand: understand the time series database incluxdb
[Mori city] random talk on GIS data (I)
L1-024 the day after tomorrow (5 points)
Oceanbase is the leader in the magic quadrant of China's database in 2021
In the era of low code development, is it still needed?
Rapidjson reading and writing JSON files
Implementation of ZABBIX agent active mode
Used on windows Bat file startup project
tornado之目录
L2-013 red alarm (C language) and relevant knowledge of parallel search
Flask 常用组件
BibTex中参考文献种类
The idea of implementing charts chart view in all swiftui versions (1.0-4.0) was born
JVM -- class loading process and runtime data area
输入年份、月份,确定天数
2022-021ARTS:下半年开始
Detailed introduction to the big changes of Xcode 14
Leetcode(215)——数组中的第K个最大元素
Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology