Sponsored Content
Full Discussion: moving rrd data to mysql
Special Forums UNIX and Linux Applications Infrastructure Monitoring moving rrd data to mysql Post 302360933 by Scott on Sunday 11th of October 2009 02:30:28 PM
Old 10-11-2009
Hi pupp.

No, I never have for that specific purpose. But I have used RRDtool for a while, and used it to extract data for other purposes (such as formatting it to compile reports, generating graphs, etc.).

Is there a specific problem you're having?
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Moving specific data between databases

Dear All, I have 2 databases, There is a lot of data in both the databases, i would like to move some data from one database to the other. I would like to accept 2 parameters from the user, i.e. emplyee id & dept, on entering the 2 i will unload all the data from the tables to the flat files.... (2 Replies)
Discussion started by: lloydnwo
2 Replies

2. Shell Programming and Scripting

Moving data from one database to other

Dear All, I have 2 databases, There is a lot of data in both the databases, i would like to move some data from one database to the other. I would like to accept 2 parameters from the user, i.e. emplyee id & dept, on entering the 2 i will unload all the data from the tables to the flat files.... (6 Replies)
Discussion started by: lloydnwo
6 Replies

3. Shell Programming and Scripting

Will moving data from one filesystem to another affect current software installation

Here we have concern. We have a IBM software installed in a server S1 in the location : /opt/IBM. In this server S1, we have /opt file system in local disk. We don't have any option to increase the file system there. We have created a separate /opt/IBM_NEW file system with 10GB in S1 server.... (1 Reply)
Discussion started by: mehimadri
1 Replies

4. Shell Programming and Scripting

Moving files listed in a data file to a new directory using Perl

Hi, I have a data file that lists a number of files. I want to move the files named in that one to another directory. Here's what I have: #!/usr/bin/perl -w open(FILE, "<collision.txt"); my @lines=<FILE>; foreach my $lines (@lines) { system("mv $lines collisions/."); } close(FILE); ... (2 Replies)
Discussion started by: renthead720
2 Replies

5. Shell Programming and Scripting

Moving a column across a delimited data file

Hi, I am trying to move a column from one position to another position in a delimited file. The positions are dynamic in nature and are available by environmental variables. Also the file can have n number of columns. Example: Initial Column Position=1 Final Column Position=3 Delimiter='|' ... (2 Replies)
Discussion started by: ayan153
2 Replies

6. UNIX for Dummies Questions & Answers

Data file moving

Suppose there is a file “Text1.txt” which contains 100 lines. I need to move 1st 25 line into another file “Text2.txt” How we can do it? Suppose there is a file “Text1.txt” in which city: Bangalore is repeating N times. I need to replace Bangalore with Delhi. How we can do... (1 Reply)
Discussion started by: Rajesh1412
1 Replies

7. Shell Programming and Scripting

Pulling Data, Then Moving to the Next File

I'm scanning a list of emails- I need to pull 2 pieces of data, then move to the next file: Sender's Email Address Email Date I need these to be outputted into a single column- separated by a ",". Like this: Email1's Address, Email1's Date Stamp Email2's Address, Email2's Date Stamp... (4 Replies)
Discussion started by: sudo
4 Replies

8. UNIX for Beginners Questions & Answers

Help with moving list of data to 2nd column of HTML file

Hi Team, Can you help me with writing shell script to printing the list output to 2nd column in HTML file. (2 Replies)
Discussion started by: veereshshenoy
2 Replies
RRDGRAPH_LIBDBI(1)						      rrdtool							RRDGRAPH_LIBDBI(1)

NAME
rrdgraph_libdbi - fetching data for graphing in rrdtool graph via libdbi SYNOPSIS
<rrdfile> = sql//<libdbi driver>/<driver-option-name>=<driver-option-value>/...[/rrdminstepsize=<stepsize>][/rrdfillmissing=<fill missing n samples>]//<table>/<unixtimestamp column>/<data value column>[/derive]/<where clause 1>/.../<where clause n> DESCRIPTION
This pseudo-rrd-filename defines a sql datasource: sql// magic cookie-prefix for a libdbi type datasource <libdbi driver> which libdbi driver to use (e.g: mysql) <driver-option-name>=<driver-option-value> defines the parameters that are required to connect to the database with the given libdbi driver (These drivers are libdbi dependent - for details please look at the driver documentation of libdbi!) /rrdminstepsize=<minimum step size> defines the minimum number of the step-length used for graphing (default: 300 seconds) /rrdfillmissing=<fill missing steps> defines the number of steps to fill with the last value to avoid NaN boxes due to data-insertation jitter (default: 0 steps) <table> defines the table from which to fetch the resultset. If there is a need to fetch data from several tables, these tables can be defined by separating the tablenames with a "+" hex-type-encoding via %xx are translated to the actual value, use %% to use % <[*]unixtimestamp column> defines the column of E<lt>tableE<gt> which contains the unix-timestamp - if this is a DATETIME field in the database, then prefix with leading '*' hex-type-encoding via %xx are translated to the actual value, use %% to use % <data value column> defines the column of E<lt>tableE<gt> which contains the value column, which should be graphed hex-type-encoding via %xx are translated to the actual value, use %% to use % /derive defines that the data value used should be the delta of the 2 consecutive values (to simulate COUNTER or DERIVE type datasources) /<where clause(s)> defines one (ore more) where clauses that are joined with AND to filter the entries in the <lt>table<gt> hex-type-encoding via %xx are translated to the actual value, use %% to use % the returned value column-names, which can be used as ds-names, are: min, avg, max, count and sigma are returned to be used as ds-names in your DS definition. The reason for using this is that if the consolidation function is used for min/avg and max, then the engine is used several times. And this results in the same SQL Statements used several times EXAMPLES
Here an example of a table in a MySQL database: DB connect information dbhost=127.0.0.1 user=rrd password=secret database=rrd here the table: CREATE TABLE RRDValue ( RRDKeyID bigint(20) NOT NULL, UnixTimeStamp int(11) NOT NULL, value double default NOT NULL, PRIMARY KEY (RRDKeyID,UnixTimeStamp) ); and the RRDKeyID we want to graph for is: 1141942900757789274 The pseudo rrd-filename to access this is: "sql//mysql/host=127.0.0.1/dbname=rrd/username=rrd/password=secret//RRDValue/UnixTimeStamp/value/RRDKeyID=1141464142203608274" To illustrate this here a command to create a graph that contains the actual values. DS_BASE="sql//mysql/host=127.0.0.1/dbname=rrd/username=rrd/password=passwd//RRDValue/UnixTimeStamp/value/RRDKeyID=1141942900757789274" rrdtool graph test.png --imgformat=PNG --start=-1day --end=+3hours --width=1000 --height=600 "DEF:min=$DS_BASE:min:AVERAGE" "LINE1:min#FF0000:value" "DEF:avg=$DS_BASE:avg:AVERAGE" "LINE1:avg#00FF00:average" "DEF:max=$DS_BASE:max:AVERAGE" "LINE1:max#FF0000:max" "DEF:sigma=$DS_BASE:sigma:AVERAGE" "CDEF:upper=avg,4,sigma,*,+" "LINE1:upper#0000FF:+4 sigma" "CDEF:lower=avg,4,sigma,*,-" "LINE1:lower#0000FF:-4 sigma" NOTES
* Naturally you can also use any other kind of driver that libdbi supports - e.g postgres, ... * From the way the data source is joined, it should also be possible to do joins over different tables (separate tables with "," in table and add in the WHERE Clauses the table equal joins. This has not been tested!!!) * It should also be relatively simple to add to the database using the same data source string. This has not been implemented... * The aggregation functions are ignored and several data columns are used instead to avoid querying the same SQL several times when minimum, average and maximum are needed for graphing... * for DB efficiency you should think of having 2 tables, one containing historic values and the other containing the latest data. This second table should be kept small to allow for the least ammount of blocking SQL statements. Whith mysql you can even use myisam table-type for the first and InnoDB for the second. This is especially interresting as with tables with +100M rows myisam is much smaller then InnoDB. * To debug the SQL statements set the environment variable RRDDEBUGSQL and the actual SQL statements and the timing is printed to stderr. BUGS
* at least on Linux please make sure that the libdbi driver is explicitly linked against libdbi.so.0 check via ldd /usr/lib/dbd/libmysql.so, that there is a line with libdbi.so.0. otherwise at least the perl module RRDs will fail because the dynamic linker can not find some symbols from libdbi.so. (this only happens when the libdbi driver is actually used the first time!) This is KNOWN to be the case with RHEL4 and FC4 and FC5! (But actually this is a bug with libdbi make files!) * at least version 0.8.1 of libdbiexhibits a bug with BINARY fields (shorttext,text,mediumtext,longtext and possibly also BINARY and BLOB fields), that can result in coredumps of rrdtool. The tool will tell you on stderr if this occures, so that you know what may be the reason. If you are not experiencing these coredumps, then set the environment variable RRD_NO_LIBDBI_BUG_WARNING, and then the message will not get shown. AUTHOR
Martin Sperl <rrdtool@martin.sperl.org> 1.4.7 2009-10-14 RRDGRAPH_LIBDBI(1)
All times are GMT -4. The time now is 07:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy