Add a Zabbix proxy to an existing Zabbix server
So; you have an existing and working Zabbix server and would like to add a Zabbix proxy server? Here are the steps:
We'll need to configure it, but that's a later step.
No matter where the database server is located, zabbix-proxy needs it's own database:
The database schema also needs to be populated. That schema can be
found from the zabbix source code package, in database/mysql/ .
The Server should point to your existing Zabbix server.
The Hostname should be set, and should match exactly on what you configure later in the existing Zabbix server webinterface.
You also need to configure the Zabbix proxy to be able to connect to the database:
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.
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.)
If you can't get the Zabbix proxy to be seen by the server, make sure that these ports are open:
Also check the logfile /var/log/zabbix_proxy.log on the Zabbix proxy.
Install zabbix-proxy
On a new host (likely in some remote network) install the software package zabbix-proxy:yum install zabbix-proxy
chkconfig zabbix-proxy on
We'll need to configure it, but that's a later step.
Create a database
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
GRANT SELECT,INSERT,UPDATE,DELETE ON zabbix.* TO 'zabbix'@'localhost' identified by 'MyZabbixPassword';
mysql -u root -p zabbix < data.sql
Configure zabbix-proxy
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
Hostname=zabbix-proxy-01.example.com
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=MyZabbixPassword
Configure zabbix-server
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.
Start zabbix-proxy
service zabbix-proxy start
Monitor a node with the zabbix-proxy
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.
Nhận xét
Đăng nhận xét