SQL Query For Relating Host, RRD File (rra), and Graph ID

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Developers, Moderators

Post Reply
iggi
Cacti User
Posts: 61
Joined: Sat Feb 23, 2008 10:41 am
Location: Flint, Michigan
Contact:

SQL Query For Relating Host, RRD File (rra), and Graph ID

Post by iggi »

I wrote a script, which in an archaic way references the RRD # and host id (I have a structured directory) and sends it to a script on my cacti server from my web server, then returns the data as XML, then it also pulls the graph from an internal path on the webserver where graphs are exported. All works fine, but I see I need 3 pieces of information for it to work: graph id, rrd #, and host number. In essence I was looking for a way to get two of them and giving only one, but I am unable to find the pieces to put them together in one query. Is anyone with insight into the DB structure help me relate these? I also realize you need something to specify the graph type, what would be the easiest way to do this, assuming I would hard code this option.

P.S.- The witness told me to look, but after an hour and a half I can't seem to find anything similar.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

iggi
Cacti User
Posts: 61
Joined: Sat Feb 23, 2008 10:41 am
Location: Flint, Michigan
Contact:

Post by iggi »

Thank you gandalf, this really does help, but I am noticing one thing that is causing an issue for the query I am trying to write. In graph_tree_items rra_id appears as it relates to the id column in rra, but in my graph_tree_items tables, the entire rra_id column are 1's
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests