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


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






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


边栏推荐
- BasicVSR++: Improving Video Super-Resolutionwith Enhanced Propagation and Alignment
- Book list | as the technical support Party of the Winter Olympics, Alibaba cloud's technology is written in these books!
- jdbc连接es查询的时候,有遇到下面这种情况的大神嘛?
- PCIE知识点-010:PCIE 热插拔资料从哪获取
- Handwritten easy version flexible JS and source code analysis
- 2022-021ARTS:下半年開始
- Oceanbase is the leader in the magic quadrant of China's database in 2021
- [FreeRTOS] FreeRTOS learning notes (7) - handwritten FreeRTOS two-way linked list / source code analysis
- [Flink] temporal semantics and watermark
- When JDBC connects to es query, is there a God who meets the following situation?
猜你喜欢

Routing decorator of tornado project

【Kubernetes系列】Kubernetes 上安装 KubeSphere

Practice (9-12 Lectures)

This article is enough for learning advanced mysql

User login function: simple but difficult
![[Mori city] random talk on GIS data (I)](/img/e4/2a2ceb10a2c0285cdd0c922f827930.png)
[Mori city] random talk on GIS data (I)

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

在所有SwiftUI版本(1.0-4.0)中原生实现Charts图表视图之思路

PCIE知识点-010:PCIE 热插拔资料从哪获取

Chain ide -- the infrastructure of the metauniverse
随机推荐
Practice (9-12 Lectures)
Zephyr Learning note 2, Scheduling
Activiti common operation data table relationship
Book list | as the technical support Party of the Winter Olympics, Alibaba cloud's technology is written in these books!
Zephyr study notes 2, scheduling
[real case] how to deal with the failure of message consumption?
Transition technology from IPv4 to IPv6
[kubernetes series] kubesphere is installed on kubernetes
Enter the year, month, and determine the number of days
[network security] what is emergency response? What indicators should you pay attention to in emergency response?
flask-sqlalchemy 循环引用
Routing decorator of tornado project
The idea of implementing charts chart view in all swiftui versions (1.0-4.0) was born
Preliminary study on temporal database incluxdb 2.2
Zephyr 学习笔记2,Scheduling
L1-028 judging prime number (10 points)
University stage summary
Distributed transaction management DTM: the little helper behind "buy buy buy"
Tri des fonctions de traitement de texte dans MySQL, recherche rapide préférée
L2-013 red alarm (C language) and relevant knowledge of parallel search