Zabbix docker cheat sheet, Ubuntu 18

Install docker:
apt -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Verify that you now have the key with the fingerprint:
apt-key fingerprint 0EBFCD88
Install docker repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Update repo:
apt -y update
Install docker Community Edition:
apt-get install docker-ce docker-ce-cli containerd.io
Run latast stable zabbix appliance:
docker run --name zabbix-appliance -t -p 10051:10051 -p 80:80 -d zabbix/zabbix-appliance:latest
Allow to execute docker from another user:
sudo usermod -aG docker $USER
groups $USER
Open bash in for docker image:
docker exec -it zabbix-appliance bash
To allow the local agent to be connected from zabbix server spinning on docker you have to use 172.17.0.2:
Server=127.0.0.1,172.17.0.2
ServerActive=172.17.0.2
View logs:
docker logs zabbix-appliance

No comments: