Zabbix For Centraziled Server Monitoring
Zabbix For Centraziled Server Monitoring
Short description:
Zabbix is open-source monitoring software for networks and applications. It offers real-time
monitoring of thousands of metrics collected from servers, virtual machines, and any other kind of network
device.
Installation procedure
1.Manual installation:
● First, we need to install the Zabbix Server on the server where we installled MySQL, Apache, and
PHP. Log into this machine as your non-root user:
Ssh sysadmin@server_ip
● update your system's list of available packages:
sudo apt-get update
● install the PHP modules Zabbix needs:
sudo apt-get install php7.0-xml php7.0-bcmath php7.0-mbstring
● Download and install the repository configuration package:
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/za
bbix-release/zabbix-release_3.2-1+xenial_all.deb
sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb
● Update the package index so the new repository is included:
sudo apt-get update
● Install the Zabbix server and web frontend with MySQL database support:
sudo apt-get install zabbix-server-mysql zabbix-frontend-php
● install the Zabbix agent, which will let us collect data about the Zabbix server status itself.
sudo apt-get install zabbix-agent
The web interface lets us see reports and add hosts that we want to monitor, but it needs some
initial setup before we can use it. Launch your browser and go to the address
http://your_zabbix_server_ip_address/zabbix/.
The default user is Admin and the password is zabbix.
2. Dockerization of Zabbix Server
● Create a zabbix.yaml file and paste it
version: '3'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: softinc
MYSQL_ROOT_PASSWORD: softinc
ports:
- 3006:3306
volumes:
- /var/mysql_zabbix_data:/var/lib/mysql
zabbix-java-gateway:
image: zabbix/zabbix-java-gateway:latest
restart: always
zabbix-server-mysql:
image: zabbix/zabbix-server-mysql:latest
restart: always
environment:
DB_SERVER_HOST: db
MYSQL_DATABASE: zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: softinc
MYSQL_ROOT_PASSWORD: softinc
ZBX_JAVAGATEWAY: zabbix-java-gateway
links:
- db:mysql
- zabbix-java-gateway:zabbix-java-gateway
ports:
- 10051:10051
zabbix-web-nginx-mysql:
image: zabbix/zabbix-web-nginx-mysql:latest
restart: always
environment:
DB_SERVER_HOST: db
MYSQL_DATABASE: zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: softinc
MYSQL_ROOT_PASSWORD: softinc
links:
- db:mysql
-y
zabbix-server-mysql:zabbix-server
ports:
- 7500:80
● Run the container as stack deploy service.
docker stack deploy -c zabbix.yaml zabbix_server
● Log in to the second server, which we'll call the “monitored server”.
Ssh sysadmin@monitoring_server-IP
● run the following commands to install the repository configuration package:
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-
release_3.2-1+xenial_all.deb
lick on the Configuration, and then Hosts in the top navigation bar. Then click Create host button in the top right
corner of the screen. This will open the host configuration page.
Click on the below link to know more about the host configuration,
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-zabbix-to-securely-monitor-remote-
servers-on-ubuntu-16-04#step-6-%E2%80%94-adding-the-new-host-to-zabbix-server