This will assume that you are to be using MySQL for all databases.
This requires config for zabbix agent as well as the dnstest.php script somewhere on the path, for example /usr/local/bin/dnstest.php.
Content for /etc/zabbix/zabbix_agent.d/userparameter_dnstest.conf
UserParameter=dns.ping[*],dnstest.php $1 $2
- Install dependencies
sudo apt install mysql-server libcurl3 libssh2-1 libsnmp30 libodbc1 fping libopenipmi0 libmysqlclient20 snmp-mibs-downloader
- Download http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix/zabbix-proxy-mysql_3.0.4-1+xenial_amd64.deb or other suitable package from zabbix. Try to get the latest available one.
- Install downloaded package
sudo dpkg -i zabbix-proxy-mysql_3.0.4-1+xenial_amd64.deb
- Install updates
sudo apt-get update
- Comment out
mibs :
in/etc/snmp/snmp.conf
to enable all downloaded mibs
Edit /etc/zabbix/zabbix_proxy.conf
in your favourite editor.
Server=<ip to zabbix-server>
Hostname=<hame of zabbix proxy configured in server>
DBPassword=<password>
echo "create database zabbix_proxy character set utf8 collate utf8_bin;" | mysql -uroot -p<password>
echo "grant all privileges on zabbix_proxy.* to zabbix@localhost identified by '<password>';" | mysql -uroot -p<password>
cd /usr/share/doc/database/mysql
cd /usr/share/doc/zabbix-proxy-mysql
zcat schema.sql.gz | mysql -uzabbix -p<password> zabbix_proxy
sudo systemctl restart zabbix-proxy.service
#check for errors
sudo tail -f /var/log/zabbix/zabbix_proxy.log