Zabbix Agent 安装3

2022-03-21 18:33:15 浏览数 (1)

当它可以开机启动

代码语言:javascript复制
[root@zbx-target zabbix]# chkconfig  --list | grep zabbix
zabbix-agent   	0:off	1:off	2:off	3:off	4:off	5:off	6:off
[root@zbx-target zabbix]# chkconfig  zabbix-agent on 
[root@zbx-target zabbix]# chkconfig  --list | grep zabbix
zabbix-agent   	0:off	1:off	2:on	3:on	4:on	5:on	6:off
[root@zbx-target zabbix]# 

使用zabbix-server测试连接

代码语言:javascript复制
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "system.cpu.load[all,avg1]"
0.010000
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "system.cpu.load[all,avg5]"
0.020000
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "system.cpu.load[all,avg15]"
0.010000
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "net.tcp.listen[10050]"
1
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "net.tcp.listen[10051]"
0
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "system.boottime"
1449836322
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "agent.version"
2.4.7
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "net.if.discovery"
{"data":[{"{#IFNAME}":"lo"},{"{#IFNAME}":"em1"},{"{#IFNAME}":"em2"},{"{#IFNAME}":"em3"},{"{#IFNAME}":"em4"}]}
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "system.cpu.discovery"
{"data":[{"{#CPU.NUMBER}":0,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":1,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":2,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":3,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":4,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":5,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":6,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":7,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":8,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":9,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":10,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":11,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":12,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":13,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":14,"{#CPU.STATUS}":"online"},{"{#CPU.NUMBER}":15,"{#CPU.STATUS}":"online"}]}
[root@zbx-server script]# zabbix_get -s zbx-target -p 10050 -k "system.sw.arch"
x86_64
[root@zbx-server script]# 

可以正常获取检测结果,说明连接通畅,更多的监控条目可以参考 Zabbix agent items ,这些条目的详细解释可以参考 Zabbix agent

Zabbix中已经集成了大量的常用监控条目,不用过多配置就可以直接使用

0 人点赞