自定义监控项--监控CPU信息
1、服务端安装zabbix-get安装
Zabbix-Get 是Zabbix 中的一个程序,用于Zabbix-Server 到Zabbix-Agent 的数据获取,通常可以用来检测验证Agent 的配置是否正确。
[email protected]:~# apt-get install zabbix-get
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
zabbix-get
0 upgraded, 1 newly installed, 0 to remove and 86 not upgraded.
Need to get 60.0 kB of archives.
After this operation, 184 kB of additional disk space will be used.
Get:1 http://repo.zabbix.com/zabbix/3.0/ubuntu/ trusty/main zabbix-get amd64 1:3.0.4-1+trusty [60.0 kB]
Fetched 60.0 kB in 0s (91.7 kB/s)
Selecting previously unselected package zabbix-get.
(Reading database ... 119881 files and directories currently installed.)
Preparing to unpack .../zabbix-get_1%3a3.0.4-1+trusty_amd64.deb ...
Unpacking zabbix-get (1:3.0.4-1+trusty) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up zabbix-get (1:3.0.4-1+trusty) ...
2、验证Agent端CPU信息(120.55.*.*改成你要监控的主机IP)
[email protected]:~# zabbix_get -s 120.55.*.* -k system.cpu.util[,user]
22.025549
[email protected]:~# zabbix_get -s 120.55.*.* -k system.cpu.util[,system]
0.642738
[email protected]:~# zabbix_get -s 120.55.*.* -k system.cpu.util[,idle]
77.281456
[email protected]:~# zabbix_get -s 120.55.*.* -k system.cpu.util[,iowait]
3、创建对应的监控项
(1)一次点击ConfigurationèHostsèGroup(选择监控主机所在的组)èItems
(2)创建Create Item
(3)配置监控项,监控CPU空闲率
(4)点击Add保存添加
(5)完成自定义监控项目
(6)查看最新数据
(7)同样的方式添加你需要监控的项,你可以根据自己实际需求监控CPU信息