Zabbix for Monitoring and More
After a year of using Sensu to monitor our infrastructure, Ive reverted back to using the old faithful Zabbix, sensu worked but wasnt as simple and problem free as zabbix was. We are doing a few things different this time. We are not running Zabbix on a pc or dedicated hardware, but rather running it on a virtual server running within our Vcentre cluster and backed up by Veeam 9. We therefor do not need to worry about hardware failures or performance issues, we can easily increase memory or cpu if required.
We are also using zabbix proxies to monitor the remote branches, this works significantly better than it did the last time and updates etc are filtered back even if the link between the branch offices is interupted.
Below is a simple howto to get a distributed zabbix monitoring system up and running. Feel free to add comments or suggestions on how to improve this howto.
Master Node
Install the mysql database and setup the necessary permissions
We are also using zabbix proxies to monitor the remote branches, this works significantly better than it did the last time and updates etc are filtered back even if the link between the branch offices is interupted.
Below is a simple howto to get a distributed zabbix monitoring system up and running. Feel free to add comments or suggestions on how to improve this howto.
Master Node
- Install ubuntu 16.04lts
- apt-get update
- apt-get upgrade
- apt-get dist-upgrade
- go to http://www.zabbix.com/download
- wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix/zabbix-agent_3.2.4-1+xenial_amd64.deb
- wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix/zabbix-server-mysql_3.2.4-1+xenial_amd64.deb
- wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix/zabbix-frontend-php_3.2.4-1+xenial_all.deb
- apt-get install mysql-server
- apt-get install mysql-client
Install the downloaded packages
- dpkg -i zabbix-agent_3.2.4-1+xenial_amd64.deb
- dpkg -i zabbix-server-mysql_3.2.4-1+xenial_amd64.deb
- dpkg -i zabbix/zabbix-frontend-php_3.2.4-1+xenial_all.deb
- mysql --user=root -p mysql
- enter the root password when prompted.
- create database zabbix
- grant all privileges on zabbix.* to zabbix-admin@localhost identified by 'zabbix-password';
- flush privileges
- exit mysql then cd /usr/local/doc/zabbix-server-mysql
- gunzip create.sql.gz
- mysql --user=zabbix-admin -p zabbix < create.sql
edit the zabbix agent and point the settings at itself , this is to gather local data
- vi /etc/zabbix/zabbix_agentd.conf
- set Server=localhost
- set ServerActive=localhost
- set Hostname=hostname.of.zabbix.server
edit the zabbix server config file
- vi /etc/zabbix/zabbix_server.con
- set DBName=zabbix
- set DBUser=zabbix-admin
- set DBPassword=my.secret.password
Restart the services
- /etc/init.d/zabbix-server restart
- /etc/init.d/zabbix-agent restart
Proxy Node
- Install ubuntu 16.04lts ensure its patched and updated
- wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix/zabbix-agent_3.2.4-1+xenial_amd64.deb
- wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix/zabbix-proxy-mysql_3.2.4-1+xenial_i386.deb
- install mysql server - apt-get install mysql-server
- setup the mysql database and credentials similar to the server node
Update the zabbix agent config and point it to iteself
- vi /etc/zabbix/zabbix_agentd.conf
- set Server=local_ip
- set ServerActive=local_ip
- set Hostname=hostname.of.zabbix.proxy
- vi /etc/zabbix/zabbix_proxy.conf
- set Server=zabbix.server.ip
- set Hostname=hostname.of.zabbix.proxy
restart zabbix agent and proxy
- /etc/init.d/zabbix-agent restart
- /etc/init.d/zabbix-proxy restart
Before you can use the proxy node, it needs to be setup as a host first. Go to configuration -> Hosts and setup the proxy as you would any other host.
Once done go to Administration->Proxies . Click on create proxy and enter the necessary details. Select active mode in the proxy mode option.
Comments
Post a Comment