Gentoo Archives: gentoo-user

From: Mark Shields <laebshade@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] rrd to CSV
Date: Sat, 04 Jul 2009 16:23:28
Message-Id: 642958cc0907040923n5592c393t73b2df7196e1ec8d@mail.gmail.com
In Reply to: [gentoo-user] [OT] rrd to CSV by Mick
1 On Sat, Jul 4, 2009 at 11:36 AM, Mick <michaelkintzios@×××××.com> wrote:
2
3 > Hi All,
4 >
5 > I know that rrdtool dump will export the rrd data into XML, but is there
6 > something to either directly or via rrdtool create a CSV file for me? Will
7 > probably want to run this on a cron job and email/save it.
8 > --
9 > Regards,
10 > Mick
11 >
12
13
14 Judging from a few cursory google searches, it won't output to CSV, but you
15 can easily convert it. Try piping the file/output to these commands (yanked
16 from Cacti forums):
17 | grep -v NaN | grep '<row>' | tr e ' ' \
18 | awk {'print "Q"$2"qcq"$3"qcq"$9"Q"'} \
19 | tr Q '"' | tr c ',' | tr q '"'"
20
21
22 Haven't tested it, but looks like it should work.
23 --
24 - Mark Shields

Replies

Subject Author
Re: [gentoo-user] [OT] rrd to CSV Mick <michaelkintzios@×××××.com>
Re: [gentoo-user] [OT] rrd to CSV Mick <michaelkintzios@×××××.com>