[solved] Broken graphs in tree mode, individual graphs works

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
doctorjbeam
Posts: 5
Joined: Mon Jul 28, 2008 6:26 am

[solved] Broken graphs in tree mode, individual graphs works

Post by doctorjbeam »

Hi folks,

I'm sure you're sick of all the 'broken graphs' threads, but please bear with me here :)

Brand new install, Ubuntu 9.04 Server. Cacti installed via apt-get.

Cacti 0.8.7b
RRDTool 1.3.1

From the moment Cacti was installed I've not had any graphs work in tree mode, they're always broken. However once I drill down to an individual graph, it works fine until I want to view between a specific time.

From what I can tell from this thread (which is bang on what my problem is) the graphs will only show when the graph_start and graph_end variables are absent from the image URL.

For example, /graph.php?action=properties&local_graph_id=1&rra_id=0&view_type=&graph_start=1245497796&graph_end=1245584196 will not work while /graph.php?action=properties&local_graph_id=1&rra_id=0&view_type= will.

The debug from the working URL above is...

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="kilobytes" \
DEF:a="/var/lib/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
DEF:b="/var/lib/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:MAX \
DEF:c="/var/lib/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
DEF:d="/var/lib/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:MAX \
AREA:a#FF4105:"Free"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
STACK:c#FFC73B:"Swap"  \
GPRINT:c:LAST:"Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s" 
...and the debug from the non-working URL above is...

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1245497796 \
--end=1245584196 \
--title="Localhost - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2009/06/20 21:36:36 To 2009/06/21 21:36:36\c" \
COMMENT:"  \n" \
--vertical-label="kilobytes" \
DEF:a="/var/lib/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
DEF:b="/var/lib/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:MAX \
DEF:c="/var/lib/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
DEF:d="/var/lib/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:MAX \
AREA:a#FF4105:"Free"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
STACK:c#FFC73B:"Swap"  \
GPRINT:c:LAST:"Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s" 
Any help whatsoever would be greatly appreciated! :D

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

Post by gandalf »

Try to run the last command from cli, pipe output to /dev/null
Do you receive an error message? When omitting the Comment lines, does it work? Be aware, that rrdtool 1.3.1 is broken, upgrade to latest, if possible (I'm running 1.3.8 from F11 repositories)
Reinhard
doctorjbeam
Posts: 5
Joined: Mon Jul 28, 2008 6:26 am

Post by doctorjbeam »

Thanks Reinhard,

Yes, there was an error message:

Code: Select all

[23:26:48 root]$ /usr/bin/rrdtool graph - \
> --imgformat=PNG \
> --start=1245497796 \
> --end=1245584196 \
> --title="Localhost - Memory Usage" \
> --rigid \
> --base=1000 \
> --height=120 \
> --width=500 \
> --alt-autoscale-max \
> --lower-limit=0 \
> COMMENT:"From 2009/06/20 21:36:36 To 2009/06/21 21:36:36\c" \
> COMMENT:"  \n" \
> --vertical-label="kilobytes" \
> DEF:a="/var/lib/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
> DEF:b="/var/lib/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:MAX \
> DEF:c="/var/lib/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
> DEF:d="/var/lib/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:MAX \
> AREA:a#FF4105:"Free"  \
> GPRINT:a:LAST:"Current\:%8.2lf %s"  \
> GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
> GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
> STACK:c#FFC73B:"Swap"  \
> GPRINT:c:LAST:"Current\:%8.2lf %s"  \
> GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
> GPRINT:d:MAX:"Maximum\:%8.2lf %s"
ERROR: I don't understand ':36:36 To 2009/06/21 21:36:36\c' in command: 'COMMENT:From 2009/06/20 21:36:36 To 2009/06/21 21:36:36\c'.
Without the comment lines, it works fine.

I'll might have to look into upgrading RRDtool, but I'd prefer not to if there's something easy to fix here.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The COMMENT line should look like

Code: Select all

COMMENT:"From 2009/06/22 21\:27\:47 To 2009/06/23 21\:27\:47\c" \
See the escaping of ":"? Please verify "Settings -> RRDTool Utility Version". For Cacti 087d and RRDTool Version 1.3.x, the escaping of colons should occur as required
Reinhard
doctorjbeam
Posts: 5
Joined: Mon Jul 28, 2008 6:26 am

Post by doctorjbeam »

*stupid* :lol:

Thanks for that. It was on 1.0.x, putting it to 1.2.x fixed it.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

That was going to be my next question ;)

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest