Highly Available Cacti Setup

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mrlesmithjr
Posts: 2
Joined: Wed Mar 16, 2016 10:08 pm

Highly Available Cacti Setup

Post by mrlesmithjr »

So I am currently working on a project to build a highly available Cacti solution and have ran into a small snag. This solution consists of 5 nodes (2-KeepAliveD/HAProxy nodes with Cacti installed behind NGINX/GlusterFS client mounting cacti Webroot from GlusterFS Servers) and (3-Galera/MariaDB cluster nodes for MySQL DB/GlusterFS Server for Webroot of cacti). All seems to be just fine however when I connect to the second Cacti Web frontend server I am getting the following error.

----------------
You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:

mysql -u cactiuser -p cactidb < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
----------------

My assumption is that there is something in the CactiDB that is identifying the Web frontend I am connecting from and one is fine but the other is not. I can attempt to import the DB schema from the node that is experiencing the issue but of course that fails because the DB tables already exist and it errors out.

My hope is that maybe someone has some insight into standing up an HA Cacti solution or someone knows how to get around this issue.

Thanks a bunch!

BTW!!! I am putting this all together using Ansible so once I get this working completely it will be shared on my GitHub repo.
https://github.com/mrlesmithjr
@mrlesmithjr
mrlesmithjr
Posts: 2
Joined: Wed Mar 16, 2016 10:08 pm

Re: Highly Available Cacti Setup

Post by mrlesmithjr »

UPDATE!!!! In case anyone else runs into this it seems I have solved the issue. The issue is that the schema is based on ENGINE=MyISAM and I ran into this before where Galera does not replicate the DB(s) if they are based on that Engine. So if you change all ENGINE=MyISAM to ENGINE=InnoDB it works and the DB is replicated correctly. I finally figured out that I was hitting only one DB server via HAProxy and it was the only one with the table(s) update which included the version of Cacti and etc. So I will be back and post up the Ansible playbook as well as a blog post to go along with it in case anyone else is interested.
alkman82
Cacti User
Posts: 50
Joined: Tue Dec 15, 2009 7:32 am
Location: Athens

Re: Highly Available Cacti Setup

Post by alkman82 »

That's very interesting! Did you managed to finish this blogpost? :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests