1. ubuntu上安装zabbix服务端
1) sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
修改/etc/php5/apache2/php.ini
max_execution_time = 300
max_input_time = 600
post_max_size = 38M (Need >8M)
date.timezone = Asia/Chongqing
2) sudo apt-get install zabbix-server-mysql zabbix-frontend-php
2. 默认用户密码
用户:admin
密码:zabbix
3. 启动监控
configuration -> host -> select "Zabbix server" -> select "Activated selected" -> Go
4. 修改server配置文件
vi /etc/zabbix/zabbix_server.conf
5. 安装客户端
1) Linux:
apt-get install zabbix-agent
zabbix_agentd –c /etc/zabbix/zabbix_agentd.conf
2) Windows (cmd must run as administrator):
C:\Windows\system32>cd C:\tool\zabbix_agents_2.2.5\bin\win64
C:\tool\zabbix_agents_2.2.5\bin\win64>zabbix_agentd.exe -c c:\zabbix\zabbix_agen
td.conf -i
zabbix_agentd.exe [3516]: service [Zabbix Agent] installed successfully
zabbix_agentd.exe [3516]: event source [Zabbix Agent] installed successfully
C:\tool\zabbix_agents_2.2.5\bin\win64>zabbix_agentd.exe -c c:\zabbix\zabbix_agen
td.conf -s
zabbix_agentd.exe [2476]: service [Zabbix Agent] started successfully
6. 修改客户端配置文件Zabbix_agent.conf
LogFile=c:\zabbix\zabbix_agentd.log 日志文件的存放位置
Server=192.168.1.18 zabbix服务器的IP
Hostname=192.168.1.13 被监控机的IP
7. create host
ubuntu host name是ubuntu机器名或者ip地址
8. 重启
/etc/init.d/zabbix-agent restart
/etc/init.d/zabbix-server restart
9. Create graph
Configuration→Hosts(或者templates),点击hosts/template列的Graphs,点击右上角的Create graph,出现如下表单。
31020:20140918:095104.622 cannot allocate shared memory of size 134217978: [22] Invalid argument
31020:20140918:095104.622 cannot allocate shared memory for trend cache
1) vi /etc/sysctl.conf and add the below:
kernel.shmmax = 1294967296
kernel.shmall = 3294967296
2) sysctl -p