Not able to export to CSV

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

gemini6
Posts: 13
Joined: Sun May 10, 2009 11:39 pm

Not able to export to CSV

Post by gemini6 »

I tried to export the graph data to a CSV file. However I cannot get specific data. Seems that the date is wrong, but it is correct on the windows machine.
Could someone help? Thanks a lot.
Attachments
export.JPG
export.JPG (26.68 KiB) Viewed 8417 times
diddi
Posts: 15
Joined: Fri May 08, 2009 5:15 am
Location: Regensburg/Germany

Post by diddi »

No solution for this, but I can confirm that the same happens here...

Christian
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What rrdtool version/build?
What cacti version?
What graph time span did you select/use?
gemini6
Posts: 13
Joined: Sun May 10, 2009 11:39 pm

Post by gemini6 »

I tried many time spans but still no luck. They are just some hours or days before. Graphs are showing valid data.

Operating System: XP professional SP3
Webserver: Apache 2.2.11
Cacti: 0.8.7d
Spine: 0.8.7c
MySQL: 5.0.77
PHP: 5.2.9
RRDTool (Cygwin or Win32 version): 1.2.30
Net-SNMP: 5.4.2
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Using cacti 0.8.7d + patches and rrdtool 1.2.26 Win32 build, I'm able to csv export graph data fine. Either try downgrading to my rrdtool version or to the latest 1.3.x (don't forget to set the version in cacti's settings too).
antifaction
Posts: 24
Joined: Fri Oct 05, 2007 2:12 pm

same problem

Post by antifaction »

I have a similar problem. I can export graphs fine. But only if they have three or less data sources in them. Once there are more than three it does the same as shown above.
cacti 0.8.7d
linux
antifaction
Posts: 24
Joined: Fri Oct 05, 2007 2:12 pm

Post by antifaction »

Is this a known issue? Has anyone else seen this? It's a lower priority problem for me so I would like to get some input before I go making changes.

Thank you.
cacti 0.8.7d
linux
antifaction
Posts: 24
Joined: Fri Oct 05, 2007 2:12 pm

Post by antifaction »

I have been reading other posts and I even got a message and it seems other people are having this problem. Can someone with cacti 0.8.7d please try to export a graph to cvs that has more than three data sources and post your results here? I cannot find a solution to this.

I took a graph with four data sources and try to export it and of course it didn't work. I then removed one of the data sources and it then exports fine. I added it back and had the problem still. Then I tried to remove a different data source and it worked fine again. I have tried this on other graphs using different templates as well.

I'll post if I find anything new.

Thank you for your time.
cacti 0.8.7d
linux
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

antifaction wrote: Can someone with cacti 0.8.7d please try to export a graph to cvs that has more than three data sources and post your results here?
Exported a graph with 7 data sources, no problem.
juangose
Posts: 12
Joined: Thu Jul 07, 2005 2:15 pm

Post by juangose »

I have the same problem. Cant export any graph to .cvs
juangose
Posts: 12
Joined: Thu Jul 07, 2005 2:15 pm

Post by juangose »

I changed the rrd.php with that you have in the browse SVN and nothing. I have the same output with the wrong date. If you use the installer cacti-0.8.7d-1.91x86.exe the cvs is working. but right now I use the installer cacti-0.8.7d-1.92x86.exe. I tried to changed some files in the new version from the old version but the problem continue. I dont know much of .php, maybe the developer can find the problem.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

On my XP (old and original) Cacti 0.8.7d install, the CSV export works fine. On my Windows 2003 Cacti 0.8.7d install, CSV export is broken! Tracing events with Sysinternals Processs Monitor, I can see that everything appears to work fine. Even the command which cmd.exe is invoked with (cmd.exe /c C:/rrdtool/rrdtool.exe xport --start=-86400 --end=-300 --maxrows=10000 DEF:a="C\:/Inetpub/wwwroot/cacti/rra/localhost_traffic_in_10.rrd":traffic_in:AVERAGE DEF:b="C\:/Inetpub/wwwroot/cacti/rra/localhost_traffic_in_10.rrd":traffic_out:AVERAGE CDEF:cdefa=a,8,* CDEF:cdefe=b,8,* XPORT:cdefa:"Inbound" XPORT:cdefe:"Outbound" ) runs fine at the commandline.

Stay tuned for more testing... otherwise a bug will need to be created.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

php_error log enabled revealed the following, which is the portion of the file which deals with spitting out the text in the csv file..

Code: Select all

[19-Jun-2009 11:50:47] PHP Notice:  Undefined index:  start in C:\Inetpub\wwwroot\cacti\graph_xport.php on line 101
[19-Jun-2009 11:50:47] PHP Notice:  Undefined index:  end in C:\Inetpub\wwwroot\cacti\graph_xport.php on line 102
[19-Jun-2009 11:50:47] PHP Notice:  Undefined index:  step in C:\Inetpub\wwwroot\cacti\graph_xport.php on line 103
[19-Jun-2009 11:50:47] PHP Notice:  Undefined index:  rows in C:\Inetpub\wwwroot\cacti\graph_xport.php on line 104
[19-Jun-2009 11:50:47] PHP Notice:  Undefined index:  columns in C:\Inetpub\wwwroot\cacti\graph_xport.php on line 122
[19-Jun-2009 11:50:47] PHP Notice:  Undefined index:  data in C:\Inetpub\wwwroot\cacti\graph_xport.php on line 128
trinhhoang
Posts: 7
Joined: Thu Jun 18, 2009 2:09 am

Post by trinhhoang »

I cannot use CSV Export. Please help me solving it.

When I click CSV Export. Brower redirect to "http://localhost/cacti/graph_xport.php? ... view_type=" page, and show code as followings.

Code: Select all

PHP Notice: Undefined index: start in C:\inetpub\wwwroot\cacti\graph_xport.php on line 101 PHP Notice: Undefined index: end in C:\inetpub\wwwroot\cacti\graph_xport.php on line 102 PHP Notice: Undefined index: step in C:\inetpub\wwwroot\cacti\graph_xport.php on line 103 PHP Notice: Undefined index: rows in C:\inetpub\wwwroot\cacti\graph_xport.php on line 104 PHP Notice: Undefined index: columns in C:\inetpub\wwwroot\cacti\graph_xport.php on line 122 PHP Notice: Undefined index: data in C:\inetpub\wwwroot\cacti\graph_xport.php on line 128 
Line 130 in Graph.php of me is:

Code: Select all

$rra = db_fetch_row("select id,timespan,steps,name from rra where id=" . $_GET["rra_id"]);
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Try using the latest versions of graph_xport.php and \lib\rrd.php from the SVN. If those don't work, then it's time to create a bug.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests