添加 'Zabbix/自定义监控.md'
This commit is contained in:
parent
16331b1da3
commit
70a96349fd
1 changed files with 25 additions and 0 deletions
25
Zabbix/自定义监控.md
Normal file
25
Zabbix/自定义监控.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
zabbix_agent配置文件中添加键值
|
||||
```shell
|
||||
# 固定写法
|
||||
# key表示键值名字,命名最好为单词+"."
|
||||
# cmd 表示命令或脚本
|
||||
UserParamter=key,cmd
|
||||
# 如
|
||||
# UserParamter=check.nginx,ss -anlutp | grep -w 80 | wc -l
|
||||
```
|
||||
客户端测试
|
||||
```shell
|
||||
# 客户端需要重启
|
||||
zabbix_agent2 -t key
|
||||
# 如
|
||||
# zabbix_agent2 -t check.ginx
|
||||
```
|
||||
服务端测试
|
||||
```shell
|
||||
# 服务端需要安装zabbix-get
|
||||
zabbix-get -s host -p port -k key
|
||||
# 如
|
||||
# zabbix-get -s 10.100.2.31 -p 10050 -k check.nginx
|
||||
```
|
||||
web配置
|
||||
主机-创建监控项-类型为zabbix客户端, 键值配置为zabbix-agent中配置的值
|
Loading…
Add table
Add a link
Reference in a new issue