Issues with Cacti HTML / Zoom feature

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

Moderators: Developers, Moderators

Post Reply
SithLord
Posts: 12
Joined: Sat Apr 30, 2005 1:11 pm

Issues with Cacti HTML / Zoom feature

Post by SithLord »

Hello,

Info : Cacti 0.8.6d running on Linux (Gentoo)

I have noticed some issues with Cacti, here they are :

1/ With the zoom feature, you select the zone you want to zoom and it zooms nicely. Now, on the result, do it again. If you select a "small" zone (in fact, too small to be resolved by the rra info), you never get the graph. If you take a look at the process list (ie: ps axf) on the server where Cacti is running, you see a rrdtool command with the CPU going through until you KILL it for good (killall -KILL rddtool) to get back your precious CPU.

This seems to be a major issue IHMO :(

2/ On a minor level, on "Graph Management" page, do a "View source" on your browser and notice the "bug".. There is a SPAN tag between EACH LETTER of all "Graph Title" entries !!!

example: "Host MIB - Logged In Users" is rendered like this :

Code: Select all

<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>H
<span style='background-color: #F8D93D;'></span>o
<span style='background-color: #F8D93D;'></span>s
<span style='background-color: #F8D93D;'></span>t
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>M
<span style='background-color: #F8D93D;'></span>I
<span style='background-color: #F8D93D;'></span>B
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>-
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>L
<span style='background-color: #F8D93D;'></span>o
<span style='background-color: #F8D93D;'></span>g
<span style='background-color: #F8D93D;'></span>g
<span style='background-color: #F8D93D;'></span>e
<span style='background-color: #F8D93D;'></span>d
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>I
<span style='background-color: #F8D93D;'></span>n
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>U
<span style='background-color: #F8D93D;'></span>s
<span style='background-color: #F8D93D;'></span>e
<span style='background-color: #F8D93D;'></span>r
<span style='background-color: #F8D93D;'></span>s
<span style='background-color: #F8D93D;'></span>
This isn't a "good thing" (C)(TM) :-D

3/ Still on a minor level, Cacti HTML code is not very well structured from a purist point of view. As a modern product, one shouldn't find old and deprecated HTML tags within it such as (hardcoded) BGCOLOR attributes on tags, MARGIN attributes on BODY, etc...

Moreover, stylesheet should reference the RIGHT tag instead of using bare class names (ie: use "td.textMenuHeader" instead of ".textMenuHeader") and the HTML page should put IDs on containers (TABLE, DIV, FORM, etc..) and CLASSes on non-containers (TD, TR, SPAN, A, INPUT, etc...).

That's it for now :-D
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: Issues with Cacti HTML / Zoom feature

Post by rony »

SithLord wrote: 1/ With the zoom feature, you select the zone you want to zoom and it zooms nicely. Now, on the result, do it again. If you select a "small" zone (in fact, too small to be resolved by the rra info), you never get the graph. If you take a look at the process list (ie: ps axf) on the server where Cacti is running, you see a rrdtool command with the CPU going through until you KILL it for good (killall -KILL rddtool) to get back your precious CPU.

This seems to be a major issue IHMO :(
What version of rrdtool are you running? I haven't had problems with 1.1.49 on my Suse 9.1 Development box. And I have tested invalid ranges.
SithLord wrote: 2/ On a minor level, on "Graph Management" page, do a "View source" on your browser and notice the "bug".. There is a SPAN tag between EACH LETTER of all "Graph Title" entries !!!

example: "Host MIB - Logged In Users" is rendered like this :

Code: Select all

<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>H
<span style='background-color: #F8D93D;'></span>o
<span style='background-color: #F8D93D;'></span>s
<span style='background-color: #F8D93D;'></span>t
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>M
<span style='background-color: #F8D93D;'></span>I
<span style='background-color: #F8D93D;'></span>B
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>-
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>L
<span style='background-color: #F8D93D;'></span>o
<span style='background-color: #F8D93D;'></span>g
<span style='background-color: #F8D93D;'></span>g
<span style='background-color: #F8D93D;'></span>e
<span style='background-color: #F8D93D;'></span>d
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>I
<span style='background-color: #F8D93D;'></span>n
<span style='background-color: #F8D93D;'></span>
<span style='background-color: #F8D93D;'></span>U
<span style='background-color: #F8D93D;'></span>s
<span style='background-color: #F8D93D;'></span>e
<span style='background-color: #F8D93D;'></span>r
<span style='background-color: #F8D93D;'></span>s
<span style='background-color: #F8D93D;'></span>
This isn't a "good thing" (C)(TM) :-D
Please submit this as a bug at bugs.cacti.net.
SithLord wrote: 3/ Still on a minor level, Cacti HTML code is not very well structured from a purist point of view. As a modern product, one shouldn't find old and deprecated HTML tags within it such as (hardcoded) BGCOLOR attributes on tags, MARGIN attributes on BODY, etc...

Moreover, stylesheet should reference the RIGHT tag instead of using bare class names (ie: use "td.textMenuHeader" instead of ".textMenuHeader") and the HTML page should put IDs on containers (TABLE, DIV, FORM, etc..) and CLASSes on non-containers (TD, TR, SPAN, A, INPUT, etc...).
Yep... Known problem, will be fixed when we re-evaluate the html rendering functions in the next release... Eventually..... :) It's on the list, and it's going to happen, just don't know if it will be next release or not.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
SithLord
Posts: 12
Joined: Sat Apr 30, 2005 1:11 pm

Re: Issues with Cacti HTML / Zoom feature

Post by SithLord »

rony wrote:What version of rrdtool are you running? I haven't had problems with 1.1.49 on my Suse 9.1 Development box. And I have tested invalid ranges.
RRDTool 1.0.49 on Gentoo (stable, 2005.0)
rony wrote:Please submit this as a bug at bugs.cacti.net.
Done. http://bugs.cacti.net/view.php?id=453
rony wrote:Yep... Known problem, will be fixed when we re-evaluate the html rendering functions in the next release... Eventually..... :) It's on the list, and it's going to happen, just don't know if it will be next release or not.
At least the problem il known, that's good and it'll be fixed, one day or another but it will ! :-D
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Opps, I ment 1.0.49 rrdtool.... Typos and me today are bad!!! :D
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
SithLord
Posts: 12
Joined: Sat Apr 30, 2005 1:11 pm

Post by SithLord »

Just to make sure with the Zoom problem, here is a reproduction of the problem :

I zoom correctly until I get this view (see attachment), then I select a zone within the blue bars. The page refreshes and I have the broken image representation in Firefox.

If I take a look at the server running Cacti, with "ps axf" I get this :

Code: Select all

 4593 ?        S      0:15  |       \_ /usr/sbin/apache2 -k start
22278 ?        S      0:00  |       |   \_ sh -c cd '/path/to/cacti/installation' ; /usr/bin/rrdtool
22279 ?        R      2:02  |       |       \_ /usr/bin/rrdtool graph - --imgformat=PNG --start=1115
And with "top", the rrdtool pid (22279) looks like this :

Code: Select all

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
22279 apache    25   0  2364  956  628 R 97.6  0.2   3:07.90 rrdtool
until I kill it ! (kill -KILL is the only way ! TERM isn't enough)

Hope it helps
Attachments
Try to zoom by selecting a small zone in the blue color. (inside a real Cacti of course :)
Try to zoom by selecting a small zone in the blue color. (inside a real Cacti of course :)
cacti_zoom.png (4.32 KiB) Viewed 5793 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Hmm, I just tried this on my Win2k3 box and didn't experiance this problem. I zoomed in 3x, so now the pic below is from a single time polling period.
Attachments
zoom3x.png
zoom3x.png (4.25 KiB) Viewed 5789 times
SithLord
Posts: 12
Joined: Sat Apr 30, 2005 1:11 pm

Post by SithLord »

I'm not on Win2K here, that's the only difference I see.

I use Cacti at home and at work and can reproduce the problem on both plateforms. Of course they are running the same OS with the same versions of software.
ews99
Posts: 2
Joined: Wed Jul 06, 2005 2:25 pm

Post by ews99 »

My situation:
I have 4 gentoo-boxes with cacti. 2 Pentium IV, 1 Pentium III and 1 Pentium II. 3 of them has the zoom issue. I'm trying to locate the differences, but so far, no result....
I thought it was a Intel Hypertreading issue, but I have one PII which has the issue.
I'm sure, it's a rrdtool issue. When starting at the command-line it freezes. Next, I'm sure it's a Gentoo specific issue. All users in topics I found uses Gentoo.
What I can't answer is why 3 machines has the problem, and 1 has not.

Code: Select all

Differences:
with zoom issue:

emerge -pv gawk zlib freetype libart_lgpl libpng gd cgilib
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild   R   ] sys-apps/gawk-3.1.3-r2  -build +nls 2,029 kB
[ebuild     U ] sys-libs/zlib-1.2.2-r1 [1.2.2] -build 363 kB
[ebuild   R   ] media-libs/freetype-2.1.9-r1  -bindist -doc +zlib 969 kB
[ebuild   R   ] media-libs/libart_lgpl-2.3.17  -debug -doc 282 kB
[ebuild   R   ] media-libs/libpng-1.2.8  -doc 375 kB
[ebuild   R   ] media-libs/gd-2.0.32  -X +jpeg +png +truetype 573 kB
[ebuild   R   ] dev-libs/cgilib-0.5-r1  0 kB

without zoom issue:

emerge -pv gawk zlib freetype libart_lgpl libpng gd cgilib

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-apps/gawk-3.1.3-r2  -build +nls 0 kB
[ebuild     U ] sys-libs/zlib-1.2.2-r1 [1.2.2] -build 363 kB
[ebuild   R   ] media-libs/freetype-2.1.9-r1  -bindist -doc +zlib 0 kB
[ebuild   R   ] media-libs/libart_lgpl-2.3.17  -debug -doc 0 kB
[ebuild   R   ] media-libs/libpng-1.2.8  -doc 0 kB
[ebuild   R   ] media-libs/gd-2.0.32  -X +jpeg +png +truetype 0 kB
[ebuild   R   ] dev-libs/cgilib-0.5  0 kB
The only different I found is cgilib. Both machines has the same USE flags for rrdtool.

I'm trying to update/degrade cgilib and will post the result
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

What about compiling RRDTool without CGI support?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Also, please change the font and see if the problem goes away.

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?
ews99
Posts: 2
Joined: Wed Jul 06, 2005 2:25 pm

Post by ews99 »

Compiling without CGI didn't solve our problem.
TheWitness wrote:Also, please change the font and see if the problem goes away.

TheWitness
How do I change it?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Settings->Visual for very specific "tweaking". Also, Settings->Paths for limited "one size fit's all" settings.

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 4 guests