So; you have an existing and working Zabbix server and would like to add a Zabbix proxy server? Here are the steps:
On a new host (likely in some remote network) install the software package zabbix-proxy:
yum install zabbix-proxy
chkconfig zabbix-proxy on
Another easy step, maybe you already have a database infrastructure on the remote network, otherwise you can always install a database server locally:
yum install mysql
/usr/bin/mysqladmin -u root password 'MyPassword'
chkconfig mysql on
service mysqld start
No matter where the database server is located, zabbix-proxy needs it's own database:
GRANT SELECT,INSERT,UPDATE,DELETE ON zabbix.* TO 'zabbix'@'localhost' identified by 'MyZabbixPassword';
The database schema also needs to be populated. That schema can be found from the zabbix source code package, in database/mysql/ .
mysql -u root -p zabbix < data.sql
There are a few items to configure in /etc/zabbix/zabbix_proxy.conf.
The Server should point to your existing Zabbix server.
Server=existing-zabbix-server.example.com
The Hostname should be set, and should match exactly on what you configure later in the existing Zabbix server webinterface.
Hostname=zabbix-proxy-01.example.com
You also need to configure the Zabbix proxy to be able to connect to the database:
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=MyZabbixPassword
This is a very easy step; go the the webinterface and click to:
Administration - DM
Click on Create Proxy
Fill in the name of the proxy, exactly like you set it on the proxy in /etc/zabbix/zabbix_proxy.conf under Hostname.
service zabbix-proxy start
On the Zabbix server you should now see under Administation - DM that the "last seen" field is updated. (It might take a minute or so.)
Now you may add hosts to zabbix that are monitored by that proxy. On the configuration of that host, select the newly configured proxy at "Monitored by proxy".
If you can't get the Zabbix proxy to be seen by the server, make sure that these ports are open:
Source | Source port | Destination | Destination port | Description |
Zabbix proxy | any | Zabbix server | 10051/tcp | The Zabbix proxy sends the traffic to the Zabbix server over this port |
Zabbix proxy | any | Zabbix hosts (agents) | 10050/tcp | The Zabbix proxy connects to monitored hosts on this port for "passive" items. |
Zabbix hosts (agents) | any | Zabbix proxy | 10051/tcp | The Zabbix hosts connect to the Zabbix proxy for "active" items. |
Also check the logfile /var/log/zabbix_proxy.log on the Zabbix proxy.