Problem with CSV Export

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

Moderators: Developers, Moderators

Post Reply
pbickerdyke
Posts: 8
Joined: Wed Jun 18, 2008 4:24 am

Problem with CSV Export

Post by pbickerdyke »

Hi all,

I am having a strange problem with CSV exports.

They work for all my graphs except those with a large number of data sources. By large I mean arround 8-9 data items.

When I click the export button next to the graph I get the header part:

Code: Select all

Title:	Freeplay per Operator
Vertical Label:	Transactions
Start Date:	01/01/1970 00:00
End Date:	01/01/1970 00:00
Step:	
Total Rows:	
Graph ID:	1692
Host ID:	95
	
Date	
But under date there is no data.

Here is an example from one that does work:

Code: Select all

Title:	Freeplay Per Webserver		
Vertical Label:	Transactions		
Start Date:	17/06/2008 09:30		
End Date:	18/06/2008 09:30		
Step:	300		
Total Rows:	289		
Graph ID:	1246		
Host ID:	95		
			
Date	                           Web01	Web02	          Web03
17/06/2008 09:30	3.89E+03	5.75E+03	2.23E+03
17/06/2008 09:35	3.75E+03	5.91E+03	2.13E+03
17/06/2008 09:40	3.90E+03	6.09E+03	2.35E+03
17/06/2008 09:45	3.97E+03	6.16E+03	2.44E+03
etc..
As soon as I get to about 8 data items in a grah the CSV has no data.

Here is my support info:

Date Wed, 18 Jun 2008 09:28:16 +0000
Cacti Version 0.8.7
Cacti OS unix
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
Hosts 133
Graphs 1504
Data Sources Script/Command: 523
SNMP: 692
SNMP Query: 809
Script Query - Script Server: 78
Total: 2102

Poller Information
Interval 300
Type cmd.php
Items Action[0]: 2716
Action[1]: 450
Action[2]: 152
Total: 3318
Concurrent Processes 1
Max Threads 1
PHP Servers 1
Script Timeout 25
Max OID 10
Last Run Statistics Time:108.6523 Method:cmd.php Processes:1 Threads:N/A Hosts:129 HostsPerProcess:129 DataSources:3318 RRDsProcessed:1994

Thanks guys.

Let me know what extra info I can offer to get some help with this. My boss uses the csv export funtionality quite a bit and he keeps asking for exports for these few graphs which have a lot of data sources :(

-Paul
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Are you able to provide an rrdtool xport of the rrd file in question? Please pm, if possible
Reinhard
pbickerdyke
Posts: 8
Joined: Wed Jun 18, 2008 4:24 am

Post by pbickerdyke »

Hi Gandalf,

There are quite a few rrd files inolved in this graph. Here is the debug info the the graph in question:

Code: Select all

/opt/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=1213777176 \
--end=1213863576 \
--title="Freeplay Traffic by Country" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2008/06/18 08\:19\:36 To 2008/06/19 08\:19\:36\c" \
COMMENT:"  \n" \
--vertical-label="Transactions" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryuk_2427.rrd":IFreeplayCountryUK:AVERAGE \
DEF:b="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryus_2428.rrd":IFreeplayCountryUS:AVERAGE \
DEF:c="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryir_2422.rrd":IFreeplayCountryIR:AVERAGE \
DEF:d="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryca_2419.rrd":IFreeplayCountryCA:AVERAGE \
DEF:e="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryfr_2420.rrd":IFreeplayCountryFR:AVERAGE \
DEF:f="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryge_2421.rrd":IFreeplayCountryGE:AVERAGE \
DEF:g="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryit_2423.rrd":IFreeplayCountryIT:AVERAGE \
DEF:h="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryme_2424.rrd":IFreeplayCountryME:AVERAGE \
DEF:i="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryar_2418.rrd":IFreeplayCountryAR:AVERAGE \
DEF:j="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountrysi_2426.rrd":IFreeplayCountrySI:AVERAGE \
DEF:ba="/opt/cacti-0.8.7/rra/free_txn_breakdown_ifreeplaycountryot_2425.rrd":IFreeplayCountryOT:AVERAGE \
AREA:a#FF0000:"UK"  \
GPRINT:a:LAST:"   %8.2lf %s"  \
AREA:b#F24AC8:"US":STACK \
GPRINT:b:LAST:"   %8.2lf %s"  \
AREA:c#6EA100:"IRE":STACK \
GPRINT:c:LAST:"  %8.2lf %s"  \
AREA:d#4444FF:"CAN":STACK \
GPRINT:d:LAST:"  %8.2lf %s"  \
AREA:e#FF7D00:"FRA":STACK \
GPRINT:e:LAST:"  %8.2lf %s"  \
AREA:f#F5F800:"GER":STACK \
GPRINT:f:LAST:"  %8.2lf %s"  \
AREA:g#96E78A:"ITA":STACK \
GPRINT:g:LAST:"  %8.2lf %s"  \
AREA:h#4668E4:"MEX":STACK \
GPRINT:h:LAST:"  %8.2lf %s"  \
AREA:i#00FF00:"ARG":STACK \
GPRINT:i:LAST:"  %8.2lf %s"  \
AREA:j#D8ACE0:"SIN":STACK \
GPRINT:j:LAST:"  %8.2lf %s"  \
AREA:ba#000000:"OTHER":STACK \
GPRINT:ba:LAST:"%8.2lf %s" 
Do you want exports from all of the rrd's or just one?

Also, attached the graph itself for reference.

Thanks
-Paul
Attachments
freeplaybycountry.png
freeplaybycountry.png (43.26 KiB) Viewed 3339 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please try to find the "smallest" graph that shows the failure. Copying a graph will help you to do so. Then, please post graph debug and rrd exports of all files involved.
Reinhard
pbickerdyke
Posts: 8
Joined: Wed Jun 18, 2008 4:24 am

Post by pbickerdyke »

Hi,

Sorry for the slow response. I have done some testing and it seems anything over 3 data sources will not export properly.

3 data sources works fine every time, 4 fails. I have tried this with multiple graphs which have 4 data source and it never works. I'm beginning to wonder if there could be a limit to the number of exports rrdtool can do in one go.

Here is the graph debug from a 4 data source graph which won't export:

Code: Select all

/opt/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=1215253437 \
--end=1215599037 \
--title="Active RGS Sessions - CGC" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2008/07/05 10\:23\:57 To 2008/07/09 10\:23\:57\c" \
COMMENT:"  \n" \
--vertical-label="Active Sessions" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/opt/cacti-0.8.7/rra/rgs_monitor_gmsessions_440.rrd":GMSessions:AVERAGE \
DEF:b="/opt/cacti-0.8.7/rra/rgs_monitor_gx2sessions_441.rrd":GX2Sessions:AVERAGE \
DEF:c="/opt/cacti-0.8.7/rra/rgs_monitor_atcsessions_439.rrd":ATCSessions:AVERAGE \
DEF:d="/opt/cacti-0.8.7/rra/rgs_monitor_gxasessions_442.rrd":GXASessions:AVERAGE \
AREA:a#FF0000:"GM"  \
GPRINT:a:LAST:" %8.0lf"  \
AREA:b#FFF200:"GX2":STACK \
GPRINT:b:LAST:"%8.0lf"  \
AREA:c#4444FF:"ATC":STACK \
GPRINT:c:LAST:"%8.0lf"  \
AREA:d#00FF00:"GXA":STACK \
GPRINT:d:LAST:"%8.0lf"
And here are the rrdxports:

1

Code: Select all

[root@gy-asp-mon01 bin]# ./rrdtool xport --start now-1h --end now DEF:GM=/opt/cacti-0.8.7/rra/rgs_monitor_gmsessions_440.rrd:GMSessions:AVERAGE XPORT:GM
<?xml version="1.0" encoding="ISO-8859-1"?>

<xport>
  <meta>
    <start>1215595800</start>
    <step>300</step>
    <end>1215599400</end>
    <rows>13</rows>
    <columns>1</columns>
    <legend>
      <entry></entry>
    </legend>
  </meta>
  <data>
    <row><t>1215595800</t><v>4.0000000000e+00</v></row>
    <row><t>1215596100</t><v>5.8533333333e+00</v></row>
    <row><t>1215596400</t><v>6.0000000000e+00</v></row>
    <row><t>1215596700</t><v>6.0000000000e+00</v></row>
    <row><t>1215597000</t><v>6.0000000000e+00</v></row>
    <row><t>1215597300</t><v>6.0000000000e+00</v></row>
    <row><t>1215597600</t><v>6.0000000000e+00</v></row>
    <row><t>1215597900</t><v>9.6933333333e+00</v></row>
    <row><t>1215598200</t><v>1.0000000000e+01</v></row>
    <row><t>1215598500</t><v>1.0000000000e+01</v></row>
    <row><t>1215598800</t><v>1.0000000000e+01</v></row>
    <row><t>1215599100</t><v>1.0000000000e+01</v></row>
    <row><t>1215599400</t><v>NaN</v></row>
  </data>
</xport>
2

Code: Select all

[root@gy-asp-mon01 bin]# ./rrdtool xport --start now-1h --end now DEF:GX2=/opt/cacti-0.8.7/rra/rgs_monitor_gx2sessions_441.rrd:GX2Sessions:AVERAGE XPORT:GX2
<?xml version="1.0" encoding="ISO-8859-1"?>

<xport>
  <meta>
    <start>1215595800</start>
    <step>300</step>
    <end>1215599400</end>
    <rows>13</rows>
    <columns>1</columns>
    <legend>
      <entry></entry>
    </legend>
  </meta>
  <data>
    <row><t>1215595800</t><v>9.0000000000e+00</v></row>
    <row><t>1215596100</t><v>9.9266666667e+00</v></row>
    <row><t>1215596400</t><v>1.0000000000e+01</v></row>
    <row><t>1215596700</t><v>1.0000000000e+01</v></row>
    <row><t>1215597000</t><v>1.0000000000e+01</v></row>
    <row><t>1215597300</t><v>1.0000000000e+01</v></row>
    <row><t>1215597600</t><v>1.0000000000e+01</v></row>
    <row><t>1215597900</t><v>1.0923333333e+01</v></row>
    <row><t>1215598200</t><v>1.1000000000e+01</v></row>
    <row><t>1215598500</t><v>1.1000000000e+01</v></row>
    <row><t>1215598800</t><v>1.1000000000e+01</v></row>
    <row><t>1215599100</t><v>1.1000000000e+01</v></row>
    <row><t>1215599400</t><v>NaN</v></row>
  </data>
</xport>
3

Code: Select all

[root@gy-asp-mon01 bin]# ./rrdtool xport --start now-1h --end now DEF:ATC=/opt/cacti-0.8.7/rra/rgs_monitor_atcsessions_439.rrd:ATCSessions:AVERAGE XPORT:ATC <?xml version="1.0" encoding="ISO-8859-1"?>

<xport>
  <meta>
    <start>1215596100</start>
    <step>300</step>
    <end>1215599700</end>
    <rows>13</rows>
    <columns>1</columns>
    <legend>
      <entry></entry>
    </legend>
  </meta>
  <data>
    <row><t>1215596100</t><v>9.2666666667e-01</v></row>
    <row><t>1215596400</t><v>1.0000000000e+00</v></row>
    <row><t>1215596700</t><v>1.0000000000e+00</v></row>
    <row><t>1215597000</t><v>1.0000000000e+00</v></row>
    <row><t>1215597300</t><v>1.0000000000e+00</v></row>
    <row><t>1215597600</t><v>1.0000000000e+00</v></row>
    <row><t>1215597900</t><v>1.0000000000e+00</v></row>
    <row><t>1215598200</t><v>1.0000000000e+00</v></row>
    <row><t>1215598500</t><v>1.0000000000e+00</v></row>
    <row><t>1215598800</t><v>1.0000000000e+00</v></row>
    <row><t>1215599100</t><v>1.0000000000e+00</v></row>
    <row><t>1215599400</t><v>1.0000000000e+00</v></row>
    <row><t>1215599700</t><v>NaN</v></row>
  </data>
</xport>
4

Code: Select all

[root@gy-asp-mon01 bin]# ./rrdtool xport --start now-1h --end now DEF:GXA=/opt/cacti-0.8.7/rra/rgs_monitor_gxasessions_442.rrd:GXASessions:AVERAGE XPORT:GXA
<?xml version="1.0" encoding="ISO-8859-1"?>

<xport>
  <meta>
    <start>1215596100</start>
    <step>300</step>
    <end>1215599700</end>
    <rows>13</rows>
    <columns>1</columns>
    <legend>
      <entry></entry>
    </legend>
  </meta>
  <data>
    <row><t>1215596100</t><v>3.0733333333e+00</v></row>
    <row><t>1215596400</t><v>3.0000000000e+00</v></row>
    <row><t>1215596700</t><v>3.0000000000e+00</v></row>
    <row><t>1215597000</t><v>3.0000000000e+00</v></row>
    <row><t>1215597300</t><v>3.0000000000e+00</v></row>
    <row><t>1215597600</t><v>3.0000000000e+00</v></row>
    <row><t>1215597900</t><v>2.0766666667e+00</v></row>
    <row><t>1215598200</t><v>2.0000000000e+00</v></row>
    <row><t>1215598500</t><v>2.0000000000e+00</v></row>
    <row><t>1215598800</t><v>2.0000000000e+00</v></row>
    <row><t>1215599100</t><v>2.0000000000e+00</v></row>
    <row><t>1215599400</t><v>2.0000000000e+00</v></row>
    <row><t>1215599700</t><v>NaN</v></row>
  </data>
</xport>
If you need anymore information, please let me know.
pbickerdyke
Posts: 8
Joined: Wed Jun 18, 2008 4:24 am

Post by pbickerdyke »

Hi all,

Sorry to bump but I really need some help on this one :(

Thanks,
Paul
pbickerdyke
Posts: 8
Joined: Wed Jun 18, 2008 4:24 am

Post by pbickerdyke »

Has no-one else tried to export a graph with more than 4 data sources?

Did it work for you?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

To be honest, I do not use export at all.
Please feel free to report a bug as given by http://www.cacti.net/bugs.php
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests