Call us Today +49 (0)7543 609337-0
Login

Register - Lost your password?

Here’s a little post on how to run a Cacti and MySQL instance using docker.

I’t based on the million12/mariadb and polinux/cacti docker image and should get you started with it.

So let’s assume you’re already running a CentOS/RHEL 7 system with docker installed which has the IP address 192.168.99.100. The following code with then start a MySQL/MariaDB server:

docker run -d --name cacti-db -p 3306:3306 --env="MARIADB_USER=cactiuser" --env="MARIADB_PASS=my_password" million12/mariadb

The next command will get your Cacti system up and running

docker run -d --name cacti -p 80:80 -p 443:443 --env="DB_ADDRESS=192.168.99.100" --env="DB_USER=cactiuser" --env="DB_PASS=my_password" polinux/cacti

You can check any issues with the logs command

docker logs cacti

You probably need to have some firewall rules enabled as well. The following lines one the docker host will enable this:

firewall-cmd --permanent --zone=public --add-service=mysql
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

Things to take care of:

The Cacti database will need to be backed up regularly. Especially keep in mind that the data is not persisten once you stop and remove the database container.

As with the database, the rrd files from the Cacti container will need to be backed up regularly as well. Alternatively you can mount a NFS share into the container to hold the rrd files

Leave a Reply

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close