sql query to get info about .rrd files from the cacti db

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
svbeek
Posts: 2
Joined: Tue Apr 04, 2006 7:57 am

sql query to get info about .rrd files from the cacti db

Post by svbeek »

Hi all

Im trying to write a mysql query to get some info about a .rrd file.
The .rrd file contains traffic data from a switch port.
I have the name of the file, and I want to know the following things from the cacti database:
- which switch does this file belong to
- which port on the switch it is
- if its in or out
- if the data is in bits per second or 95% percentile

Can anyone help me write a mysql query for this? I think I need the data_template_data and data_template_rrd tables but I do not fully understand how the database has been designed.

Thanks
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Check out the schema here: http://www.cacti.net/downloads/docs/sql/

Just so you are aware, template and graph/data sources are intermingled in the tables.

More questions, let me know.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
svbeek
Posts: 2
Joined: Tue Apr 04, 2006 7:57 am

Post by svbeek »

Hi,

Thanks for the info so far, I managed to get a little further with this schema. I can get the host description by performing an inner join on the poller_item and host tables, but where can I find the interface description associated with the arg1 value from the poller_item table?

Thanks for the help

Sander
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests