This is a project that launch a example environment of the motorization system called Zabbix for testing purposes using Vagrant. It would help you learn how to use Zabbix in your local computer.
The example environment includes:
- Zabbix server (Debian 10): Zabbix Server 5.2, Apache and PostgreSQL 12 with TimescaleDB.
- Postgres example server (Debian 10): PostgreSQL 12 and Zabbix Agent 5.2.
- Apache example server (Debian 10): Apache HTTPD 12 and Zabbix Agent 5.2.
Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines (VMs) and cloud services. Zabbix provides monitoring metrics, among others network utilization, CPU load and disk space consumption. Much more information is available on the Zabbix web site.
- VirtualBox or Hyper-v.
- Vagrant.
-
Open a terminal. If you are using Windows and Hyper-V, you must use a terminal with admin privileges.
-
Clone repository:
git clone https://github.com/alvsanand/zabbix-example-environment
cd zabbix-example-environment
- Start Zabbix server:
cd server
vagrant up
- Get Zabbix server IP:
# Copy value of "HostName"
vagrant ssh-config
- Set Zabbix server environment variable:
# UNIX
export ZABBIX_SERVER=PREVIOUS_IP
# Windows
set ZABBIX_SERVER=PREVIOUS_IP
- Start Postgres example server:
cd .. && cd postgres-server
vagrant up
- Start Apache example server:
cd .. && cd apache-server
vagrant up
-
Open Zabbis Dashboard from http://IP_ZABBIX_SERVER using default credentials user
Admin
and passwordzabbix
. -
Configure auto-registration in Zabbix:
- Add auto registration trigger: Configuration -> Action -> Autoregistration actions -> Create actions:
- Postgres:
- Conditions:
- "Host name" contains "postgres".
- Operations:
- "Add host"
- "Link Template host" for templates "Linux by Zabbix agent" and "PostgreSQL by Zabbix agent 2"
- Conditions:
- Apache:
- Conditions:
- "Host name" contains "apache".
- Operations:
- "Add host"
- "Link Template host" for templates "Linux by Zabbix agent" and "Apache by Zabbix agent"
- Conditions:
- Postgres:
- Add auto registration trigger: Configuration -> Action -> Autoregistration actions -> Create actions:
In case you want to access to the server:
- Go to the correct directory:
cd apache-server
- Execute ssh command with default password
vagrant
:
vagrant ssh
- If desired, get root credentials:
sudo su -