Cacti Database / Cacti file configuration

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
sagervai
Posts: 5
Joined: Tue Jan 17, 2012 3:07 pm

Cacti Database / Cacti file configuration

Post by sagervai »

Hi :D

I am working on a project that would allow users to control the Cacti configuration using flat configuration files. However, I am finding Cacti's database a little more than confusing and I can't seem to find any good documentation explaining the layout.

Has somebody already written this software?
Do you know a good place to find Cacti database documentation?

Thanks!

Sapphyre
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: Cacti Database / Cacti file configuration

Post by Linegod »

Take a look at the cli directory. Attempting to do this with direct database entries will break your (an my) brain.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
sagervai
Posts: 5
Joined: Tue Jan 17, 2012 3:07 pm

Re: Cacti Database / Cacti file configuration

Post by sagervai »

Unfortunately, the CLI does not provide all the functions I need to get the project running. :cry: Thanks for the suggestion! You wouldn't happen to know if there is any documentation for the database though? I've never used a more confusing database. :-?
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: Cacti Database / Cacti file configuration

Post by Linegod »

I find it hard to believe that it is not already captured by the cli. Just about everything you can do through the GUI can be done at the console (or through plugins).

Diving into the database, since it is so interdependant, is just asking for trouble.

Perhaps if you described what you were attempting to do, I might be able to help.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
sagervai
Posts: 5
Joined: Tue Jan 17, 2012 3:07 pm

Re: Cacti Database / Cacti file configuration

Post by sagervai »

I need to write a program that takes in a set of configuration files and applies changes in the files to the cacti database. This allows users to update cacti without having to use the UI (for better remote access and to work with some open source unified configuration software I have written). When I'm done writing the software, I'd love to release it open source so that other groups who need something similar can use it too. :D

I need to be able to add/change/remove devices, graphs and tree items given changes in the configuration files. From what I can tell of the CLI, it only allows users to add these items and do some database/user management. However, if I am wrong and the CLI would do these things, please tell me how! It would be so much nicer if I didn't have to meddle around the database.

If the CLI doesn't have the functionality I need, do you know anybody that does understand the database? There must be somebody who understands what's going on in there ... :-?

Thanks! :D
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: Cacti Database / Cacti file configuration

Post by Linegod »

Take a look at the autom8 plugin. That, in combination with a simple device add script (wrapped around add_device.php), should get you 90% there.

http://docs.cacti.net/plugin:autom8
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti Database / Cacti file configuration

Post by gandalf »

Find database layout documented at 1st link of my sig, last chapter
R.
sagervai
Posts: 5
Joined: Tue Jan 17, 2012 3:07 pm

Re: Cacti Database / Cacti file configuration

Post by sagervai »

Thanks guys!

However, the autom8 plugin seems to only allow users to add devices and not delete/modify. The schema is great, but it doesn't really explain what each table is for or why the database is set up that way. Unfortunately, these are things I need :(

I can't seem to find any other documentation on the database, so I've decided to make some for everybody to use. If you're interested in helping out, please post to http://forums.cacti.net/viewtopic.php?f=6&t=46309 .

Thank you!

Sapphyre
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest