当前位置:网站首页>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(具體想監控的內容)
- 創建觸發器,當監控項獲取到值的時候,進行和觸發器比較、判斷、决定是否報警
- 創建圖形
- 將具體的主機和該模板連接,關聯
找到剛才創建的模板,點擊
以上全部創建完成後,與主機進行關聯
边栏推荐
- [C language] open the door of C
- 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
- 2022 - 021arts: début du deuxième semestre
- Zephyr learning notes 1, threads
- There is no Chinese prompt below when inputting text in win10 Microsoft Pinyin input method
- Label management of kubernetes cluster
- 弈柯莱生物冲刺科创板:年营收3.3亿 弘晖基金与淡马锡是股东
- 2022-021ARTS:下半年开始
- Introduction to sap commerce cloud B2B organization function
- 时序数据库 InfluxDB 2.2 初探
猜你喜欢
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
Practice (9-12 Lectures)
System architecture design of circle of friends
Guoguo took you to write a linked list, and the primary school students said it was good after reading it
Improve the accuracy of 3D reconstruction of complex scenes | segmentation of UAV Remote Sensing Images Based on paddleseg
Chain ide -- the infrastructure of the metauniverse
[Flink] temporal semantics and watermark
大学阶段总结
tornado项目之路由装饰器
Handwritten easy version flexible JS and source code analysis
随机推荐
One of the general document service practice series
Activiti常見操作數據錶關系
谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
Preliminary study on temporal database incluxdb 2.2
Oracle stored procedures and functions
线性代数1.1
MySQL中的文本处理函数整理,收藏速查
BibTex中参考文献种类
Life planning (flag)
Improve the accuracy of 3D reconstruction of complex scenes | segmentation of UAV Remote Sensing Images Based on paddleseg
Mysql database - function constraint multi table query transaction
Used on windows Bat file startup project
What are the work contents of operation and maintenance engineers? Can you list it in detail?
Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
【FreeRTOS】FreeRTOS學習筆記(7)— 手寫FreeRTOS雙向鏈錶/源碼分析
2022-021ARTS:下半年开始
Summary of MySQL common judgment functions!! Have you used it
How to send mail with Jianmu Ci
【FreeRTOS】FreeRTOS学习笔记(7)— 手写FreeRTOS双向链表/源码分析
[C language] open the door of C