当前位置:网站首页>zabbix監控系統自定義監控內容
zabbix監控系統自定義監控內容
2022-07-04 07:39: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]agent1 ~]# 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(具體想監控的內容)
- 創建觸發器,當監控項獲取到值的時候,進行和觸發器比較、判斷、决定是否報警
- 創建圖形
- 將具體的主機和該模板連接,關聯


找到剛才創建的模板,點擊






以上全部創建完成後,與主機進行關聯


边栏推荐
- Introduction to neural network (Part 2)
- The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native
- Boast about Devops
- [real case] how to deal with the failure of message consumption?
- Electronic Association C language level 1 35, bank interest
- L1-022 odd even split (10 points)
- Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
- Preliminary study on temporal database incluxdb 2.2
- 时序数据库 InfluxDB 2.2 初探
- Rhcsa day 3
猜你喜欢

win10微软拼音输入法输入文字时候下方不出现中文提示

线性代数1.1

Guoguo took you to write a linked list, and the primary school students said it was good after reading it

提升复杂场景三维重建精度 | 基于PaddleSeg分割无人机遥感影像

Chain ide -- the infrastructure of the metauniverse

Improve the accuracy of 3D reconstruction of complex scenes | segmentation of UAV Remote Sensing Images Based on paddleseg

【森城市】GIS数据漫谈(一)

Recursive Fusion and Deformable Spatiotemporal Attention for Video Compression Artifact Reduction

谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展

Zephyr 学习笔记1,threads
随机推荐
In the era of low code development, is it still needed?
深入浅出:了解时序数据库 InfluxDB
大学阶段总结
Types of references in BibTex
NLP literature reading summary
BasicVSR++: Improving Video Super-Resolutionwith Enhanced Propagation and Alignment
rapidjson读写json文件
Recursive Fusion and Deformable Spatiotemporal Attention for Video Compression Artifact Reduction
L1-021 important words three times (5 points)
User login function: simple but difficult
输入年份、月份,确定天数
"Sword finger offer" 2nd Edition - force button brush question
L1-030 one gang one (15 points)
Introduction to sap commerce cloud B2B organization function
论文学习——基于极值点特征的时间序列相似性查询方法
Oceanbase is the leader in the magic quadrant of China's database in 2021
Activiti常見操作數據錶關系
Linear algebra 1.1
Go learning notes - constants
2022-021ARTS:下半年开始