Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] rrd to CSV
Date: Sat, 04 Jul 2009 19:20:57
Message-Id: 200907042020.53052.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] [OT] rrd to CSV by Mark Shields
1 On Saturday 04 July 2009, Mark Shields wrote:
2 > On Sat, Jul 4, 2009 at 11:36 AM, Mick <michaelkintzios@×××××.com> wrote:
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?
7 > > Will probably want to run this on a cron job and email/save it.
8 > > --
9 > > Regards,
10 > > Mick
11 >
12 > Judging from a few cursory google searches, it won't output to CSV, but you
13 > can easily convert it. Try piping the file/output to these commands
14 > (yanked
15 >
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 > Haven't tested it, but looks like it should work.
22
23 Thanks Mark, will give it a go and let you know.
24
25 --
26 Regards,
27 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature