Skip to content

kosugor/zabbix-vagrant

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant Zabbix

What is Vagrant?

Vagrant is a tool that uses Oracle's VirtualBox to dynamically build configurable, lightweight, and portable virtual machines. Vagrant supports the use of either Puppet or Chef for managing the configuration. Much more information is available on the Vagrant web site.

What is this project?

This is the Vagrant configuration used in my boxes for Zabbix at VagrantCloud. They start out with:

  • CentOS 8: Zabbix Server 5.4, Apache and PostgreSQL 12 with TimescaleDB.
  • Debian 10: Zabbix Server 5.4, Nginx and PostgreSQL 13 with TimescaleDB.
  • Rocky 8: Zabbix Server 5.4, Nginx and PostgreSQL 13 with TimescaleDB.
  • Debian 11: Zabbix Server 5.4, Nginx and PostgreSQL 13 with TimescaleDB.

How do I install Vagrant?

The VirtualBox version used is 6.1 and Vagrant version is v2.2.14.

How do I run?

Two options:

  1. Using the VagrantCloud box: From an empty directory, Create a Vagrantfile and put in it the contents:

config.vm.box could be "isaqueprofeta/zabbix-debian10":

Vagrant.configure("2") do |config|
  config.vm.box = "isaqueprofeta/zabbix-debian10"
  config.vm.box_version = "5.4"
  config.vm.network "forwarded_port", guest: 80 , host: 8080, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 5432 , host: 5432, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 10050 , host: 10050, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 10051 , host: 10051, host_ip: "127.0.0.1"
end

or "isaqueprofeta/zabbix-centos8":

Vagrant.configure("2") do |config|
  config.vm.box = "isaqueprofeta/zabbix-centos8"
  config.vm.box_version = "5.2"
  config.vm.network "forwarded_port", guest: 80 , host: 8080, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 5432 , host: 5432, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 10050 , host: 10050, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 10051 , host: 10051, host_ip: "127.0.0.1"
end

Save, exit, and then type:

vagrant init isaqueprofeta/zabbix-debian10 # Or isaqueprofeta/zabbix-centos8
vagrant up
  1. Build ground up from Centos8/Debian10: Clone this repo and inside the wanted OS folder, run vagrant up.

How do I work?

  1. Zabbix Frontend is forwarded from TCP/80 of guest to TCP/8080 on the host, so just go for http://localhost:8080 (User: Admin, Pass:zabbix), and you should be fine

  2. Ports 5432, 10050 and 10051 are directly mapped from the guest to the host to use it as appliance and make it easier to connect to the agents and to make queries using SQL.

  3. Zabbix Database Password: Z4bb1xD4t4b4s3

Quick reference:

  1. How to stop/turn off:
vagrant halt
  1. How to clean/delete all data:
vagrant destroy
vagrant box prune isaqueprofeta/zabbix-debian10 # Or isaqueprofeta/zabbix-centos8
  1. Create a snapshot for tests:
vagrant snapshot create MySnapshot
  1. Recover the snapshot:
vagrant snapshot restore MySnapshot

About

Zabbix Server and Agent with Nginx/Apache, PostgreSQL and TimescaleDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%