-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zabbix database doesn't exist. Installing and importing default settings #27
Comments
No, persistent storage(volume) is used for DB in your case:
DB is populated automatically during first start (zabbix/zabbix-db-mariadb is empty mysql server):
Next run Zabbix DB is detected, so DB import won't be executed,
Test it, but it should be OK. |
yes, config contains a section that specifies to use a persistent storage
but after stop and start container changes are not saved. $ docker inspect zabbix30_zabbix-db_1
|
I don't understand. What did you change and what is expected result? |
I'm sorry that I did not accurately describe the problem. I pull zabbix images and did not modify any configs i want to zabbix database stored on the host. Persistent storage (volume) is used for DB in docker-compose.yml:
I ran zabbix-server container, go to URL http://zabbix and configure it (create host TEST) in zabbix admin panel. I expect to files in /var/lib/mysql on host changed, but these files not change. Then i stopped the containers, removed them and start. I go to Zabbix admin panel, but there are not old settings (host TEST). If I understand correctly my data must store in /var/lib/mysql on host. But data stored only in container |
Don't remove zabbix30_zabbix-db-storage_1 container and you will be fine.
Yes, you can store them in /var/lib/mysql on your host - but you need to configure it your docker-compose.yml file. Also now are stored data on your host, my example:
It's advance concept ( I recommend you to dig into documentation and guides how to use volumes in the Docker. Then you can implement concept, which will fit for your case and needs. |
I figure out. I thought that the mysql data will be stored in /var/lib/mysql. Thank you! |
I try running zabbix container. It does successfully. But after restart container all of the data disappeared
There is part of the log:
I login to container
docker exec -it zabbix30_zabbix-server_1 bash -c "export TERM=xterm; exec bash"
and try run
mysqladmin -hzabbix.db -uzabbix -pmy_password status
and got
Uptime: 968 Threads: 23 Questions: 5744 Slow queries: 1165 Opens: 550 Flush tables: 1 Open tables: 127 Queries per second avg: 5.933
It looks like I'm working with temporary base
What am I doing wrong?
Dockerfile and docker-compose.yml is default:
docker-compose.yml:
https://github.com/zabbix/zabbix-community-docker/blob/360e7f9bada79d794f1e91cf780f6a7862063b26/Dockerfile/zabbix-3.0/docker-compose.yml
Dockerfile:
https://github.com/zabbix/zabbix-community-docker/blob/e5c550404c554ce9ef6da51ebee525e7ea3eef5a/Dockerfile/zabbix-3.0/Dockerfile
Ubuntu 14.04
The text was updated successfully, but these errors were encountered: