User Tools

Zabbix

Zabbix is a comprehensive monitor tool that collects data, store it and displays nicely.

Zabbix comes as a server and an agent, the server store data and displays it using a PHP based web interface, while the agents collects data from hosts and send it to the server.

Server Installation

Zabbix is available in Gentoo portage, but for installing the Zabbix server i prefer to use a podman container approach, because:

  • Zabbix server depends on PostgreSQL or MariaDB, and i don't want to manage either directly
  • Zabbix web UI is based on PHP, and i don't want to share a PHP instance between two services nor manually run multiple PHP instances
  • Zabbix is managed by Gentoo's webroot stuff, and i don't like it

Using a container is pretty easy for the server part and better suited to my approach.

Read this page to understand what i will be doing here.

The Zabbix docker repository is here, you need to create (as usual) a dedicated user and clone the repo:

useradd -d /data/daemons/zabbixserver -m zabbixserver
su - zabbixserver
git clone https://github.com/zabbix/zabbix-docker.git
cd zabbix-docker

Now you need to choose which version on base OS and database you want in the container… The Zabbix people like to make things complex, so you can choose beween many Linux flavours and both MariaDB or PostgreSQL. I choose Alpine (the smallest) and PostgreSQL. Then you need to go trough all the mess they did with compose (yes i know, it's advanced compose usage to leverage blah blah blah) and extrapolate a single, linear, working compose file.

I did it for you, here it is:

docker-compose.yml

TBD

Pull the images:

su - tubearchivist
podman compose pull

Reverse Proxy

Follow the The Reverse Proxy concept and the Authentication pages.

TBD

Agent Installation

TBD

Autostart

To start it, and set it up on boot, as usual follow my indications Using Containers on Gentoo, so link the user-containers init script:

ln -s /etc/init.d/user-containers /etc/init.d/user-containers.zabbixserver

and create the following config file:

/etc/conf.d/user-containers.zabbixserver
USER=zabbixserver
DESCRIPTION="Zabbix server and frontend"

Add the service to the default runlevel and start it now:

rc-update add user-containers.zabbixserver default
rc-service user-containers.zabbixserver start

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information