Some Graphs Break After Upgrade to Cacti 0.8.7a

Important information about Cacti developments that all users should be interested in.

Moderators: Developers, Moderators

User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Some Graphs Break After Upgrade to Cacti 0.8.7a

Post by TheWitness »

All,

If you obtain some broken graphs after upgrading to Cacti 0.8.7a, please use the attached lib/functions.php to resolve the issue.

"I" appologize for this inconvenience.

Regards,

TheWitness

EDIT: Re-uploaded....
Attachments
functions.tar.gz
(16.43 KiB) Downloaded 4224 times
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?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Tried this. Although it fixes my originally broken graph, it now breaks the existing HOST MIB graphs (disk stats etc) which were working before ???
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What exactly is broken with it?

Post the graph debug for it and an rrdtool info on that file. The underlaying issues is older versions of cacti didn't properly create all CF's for average, max, min, and last.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

BSOD2600 - My mistake. I have a custom CDEF which shows the amount of free space on the graphs (HOST MIB). This wasn't working yesterday before Larry's fix, and I was able to determine that it was no longer a,b,- but actually a,c,-

Larry's fix reverted the graphs back to their default behaviour, so the CDEF no longer worked, and effectively busted the graph. I have changed my CDEF back to a,b,- which seems to have resolved the problem

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Actually, since applying the new functions.php, I have come across an error (possibly associated with PIA):

Notice: Undefined index: monitor.php: in C:\wamp\www\Cacti\lib\functions.php on line 1632

This error varies depending on which plugin I am using (always the same line number though). The previous version of this file didn't exhibit this issue, so I am hazarding a guess that something is missing which the PIA requires ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Ok, found it. After a bit of investigation, it actually is PIA related - the following is missing on line 1628:

$nav = do_hook_function('draw_navigation_text', $nav);

To make life a little easier, here's a revised version of functions.php, which needs to be copied to cacti\lib
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
michelem
Posts: 34
Joined: Thu Mar 30, 2006 7:34 am

Post by michelem »

Anytime I click a plugin I got this notice:

Notice: Undefined index: weathermap-cacti-plugin.php: in /work/cacti-0.8.7a/lib/functions.php on line 1632

This happens with lib/functions.php attached here in this thread
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Strange, as this works for me (this file is the one with the changes). Which PIA are you using ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
michelem
Posts: 34
Joined: Thu Mar 30, 2006 7:34 am

Post by michelem »

The mcutting file resolve that issue
Thank you
foxfriend
Posts: 14
Joined: Wed Jul 12, 2006 9:38 pm

Post by foxfriend »

After I upgraded to 0.8.7a, the graph were stop graphing. And I used the official patch to fix that problem, it still doesn't work. Is there I can provide to help trouble shooting ? Or there's anything I missed ?

Thank you.

The debug are listed bellow:
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="FAB Ether Leased Line - Hinet ELL 50M" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10: \
--font AXIS:6: \
--font LEGEND:8: \
--font UNIT:6: \
DEF:a="/var/www/html/rra/tfabbb01_traffic_in_124.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/html/rra/tfabbb01_traffic_in_124.rrd":traffic_out:AVERAGE \
DEF:c="/var/www/html/rra/tfabbb01_traffic_in_151.rrd":traffic_in:MAX \
DEF:d="/var/www/html/rra/tfabbb01_traffic_in_151.rrd":traffic_out:MAX \
DEF:e="/var/www/html/rra/tfabbb01_traffic_in_151.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
CDEF:cdefi=c,8,* \
CDEF:cdefba=d,8,* \
AREA:cdefa#00FF00FF:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maxium\:%8.2lf %s\n" \
LINE1:cdefe#4444FFFF:"Outbound\:" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maxium\:%8.2lf %s\n" \
LINE1:cdefi#35962BFF:"In_Max" \
GPRINT:cdefa:MAX:" %8.2lf %s\n" \
LINE1:cdefba#B1441EFF:"Out_Max" \
GPRINT:cdefba:MAX:" %8.2lf %s\n"
RRDTool Says:

OK
Attachments
not_graphed.JPG
not_graphed.JPG (34.42 KiB) Viewed 38074 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

This fixes actual graphing, not collection of data which you have. Follow http://docs.cacti.net/node/283
foxfriend
Posts: 14
Joined: Wed Jul 12, 2006 9:38 pm

Post by foxfriend »

My problem sloved, thank you.
The reason my cacti stoped graph was the file privilege problem. :oops:
Devroush
Posts: 27
Joined: Sun Jan 22, 2006 7:35 am

Post by Devroush »

The functions.php that TheWitness uploaded fixes the problem for me, however I now see a warning when I go to graph_view.php (without any parameters)

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/lib/functions.php:1941) in /usr/share/cacti/site/include/top_graph_header.php on line 54

I'm using the debian package and my guess is that the maintainers changed some things. The file that mcutting uploaded broke pretty much everything :)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Double check file permissions on that new file / cacti files.
Devroush
Posts: 27
Joined: Sun Jan 22, 2006 7:35 am

Post by Devroush »

nope, they're exact the same. I'll do some diff's and see if I can find a fix that way.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest