How Cacti stores its configuration?

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

Moderators: Developers, Moderators

tezarin
Posts: 22
Joined: Tue Aug 11, 2009 10:14 am

How Cacti stores its configuration?

Post by tezarin »

Hi all,

I am new to Cacti and had a questions please, hopefully this is the correct category to post it...

I would like to know how cacti stores it's config...Can someone please point me to the right direction?

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

Post by Linegod »

All configuration information is stored in the MySQL database.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
tezarin
Posts: 22
Joined: Tue Aug 11, 2009 10:14 am

Post by tezarin »

Linegod,

Thanks for your reply, I appreciate your help. Can you please let me knoa how I can access the configuration information in mysql? Thanks in advance
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

It depends on exactly what configuration information you are looking for. I'd need more details.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
tezarin
Posts: 22
Joined: Tue Aug 11, 2009 10:14 am

Post by tezarin »

I just would like to learn more about the process, any references with regard to how cacti stores it's configuration will be so helpful.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

First, read this: http://docs.cacti.net/manual:087:2_basi ... _operation

Then, post specific questions. 'How it works' is far to broad of a topic....
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
tezarin
Posts: 22
Joined: Tue Aug 11, 2009 10:14 am

Post by tezarin »

OK, I did read about it and learned more about it. Learned that Cacti uses RRDTool to store data and puts its configuration in MySQL database.

I logged into the MySQL database and viewed the list of the tables of the Cacti database. Can someone please let me how cacti stores and uses it's plot characteristics or point me to the right direction where I can read more about it?

Thanks in advance,
Tez


+---------------------------+
| Tables_in_cacti |
+---------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| plugin_config |
| plugin_db_changes |
| plugin_hooks |
| plugin_realms |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
| weathermap_auth |
| weathermap_data |
| weathermap_maps |
| weathermap_settings |
+---------------------------+
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

What do you mean by 'plot characteristics'?
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

http://www.cacti.net/downloads/docs/sql/ is the E-R diagram for Cacti.

You need to either ask a much more specific question, or start reading the source code to get the answers you want.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
tezarin
Posts: 22
Joined: Tue Aug 11, 2009 10:14 am

Post by tezarin »

Thanks for the link. I have been digging through the mysql tables trying to learn the backebend...

To be more specific, let me add more details to my question:

See, when we log into cacti web interface, we can create a new graph manually, right? Now, I would like to be able to create an entire
node from a single script.

That's why I think if I can find where cacti puts its configuration (xml?) files or how it stores the configuration when we use the "create a graph" manually, may be I can feed a line of script to cacti and it creates a number of nodes for me. I tried to be as specific as possible, hope it make sense :)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

tezarin wrote:Thanks for the link. I have been digging through the mysql tables trying to learn the backebend...

To be more specific, let me add more details to my question:

See, when we log into cacti web interface, we can create a new graph manually, right? Now, I would like to be able to create an entire
node from a single script.

That's why I think if I can find where cacti puts its configuration (xml?) files or how it stores the configuration when we use the "create a graph" manually, may be I can feed a line of script to cacti and it creates a number of nodes for me. I tried to be as specific as possible, hope it make sense :)
Look in the cli/ folder. There are already scripts to do this.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Oh my....

I would highly suggest reading the documentation:

http://docs.cacti.net
http://docs.cacti.net/manual:087:6_refe ... cli_script

and taking a look at plugins ( http://docs.cacti.net/plugins ) before you attempt to reverse engineer Cacti...
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Deviloper
Cacti User
Posts: 256
Joined: Tue Jul 07, 2009 8:03 am

Post by Deviloper »

I just implementet an automized backend. If you have any questions feel free to contact me.

the cli-tools need a little bit tuning.... at least add_graphs.php is a pain in the neck.

Also I did an article on cacti in the freeX Magazin, it will be a complete overview of the tool.With guidelines, walktru, howto, database analysis. The mag will hit the stores on 9.10.09.
tezarin
Posts: 22
Joined: Tue Aug 11, 2009 10:14 am

Post by tezarin »

Howie, thanks much, I really appreciate it, found the folder and man, you're right, everything I need was there!

Linegod, I am new to cacti and I really think it's better to start working on a project than just reading the document, I can always go back to the docs and read up more. Thanks for the links, very helpful. :)

Deviloper, appreciate your offer, I may take you up on that 8)

Now that I know where the scripts are, can you guys tell me how I can add a data source? You know, instead on manually feeding the parameters to the script, I would like to put all of them into a data source and feed the file to teh script, something like that, hope it make sense.

I wasn't able to find add_data_source.php in cli folder...is there anywhere I could get it from? I also looked here and it wasn't there either: http://svn.cacti.net/viewvc/cacti/branches/main/cli/

Thanks in advance, really appreciate it.
Last edited by tezarin on Tue Sep 01, 2009 9:53 am, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

tezarin wrote:I really think it's better to start working on a project than just reading the document, I can always go back to the docs and read up more.
This sounds great unless you are the person spending time and energy on answering the unnecessary questions.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests