Stacked area graph with multiple arguments looks wrong

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

Moderators: Developers, Moderators

Post Reply
rrue
Posts: 4
Joined: Tue Nov 30, 2004 6:17 pm

Stacked area graph with multiple arguments looks wrong

Post by rrue »

I am attempting to create a stacked area graph of three kinds of SMTP traffic at our gateways: ham, spam, and infected mail. I'm using a short python script that returns the change in these numbers since it was last run, which Cacti launches every five minutes.

This is the first scratch-built graph we've tried with mulitple parameters passed. The script returns five arguments, "total:vvv ham:www spam:xxx virus:yyy unscannable:zzz" I've created a data input method that includes labels for ham, spam and virus, and a data source that includes them all as gauges (I've also tried them as counters. Can anyone explain the difference between a counter and a gauge?). Here's exactly what the output of the script looks like:

total:237 ham:156 spam:77 virus:4 unscannable:0

The "simple" script returns a naked integer.

The graph is stock except it uses area for the first parameter and stack for the following ones.

The results are weird and basically unreadable. I get spikes of color (I've specified red for virus, yellow for spam and green for ham) with gaps in between. The units on the y axis auto-scale to Megs (we get a lot of mail but not that much). The proportions are all wrong: spam makes up about 30% of our traffic during business hours and more than half during off-hours, and viruses average about 5-10% of our total volume, yet each color makes up about a third of the total. The busted graph is also lots spikier (is that a word?) than the working one.

For a hoot I created a parallel modified copy of the script/data input method/data source/graph that outputs a single integer for all traffic and an area graph. Pretty. Exactly what I expected. Units on Y are in the hundreds (as they should be). What I'd like to see, except with three colors for different kinds of traffic. This would suggest that the problem is with the fancy data input method / source.

I've attached some graphs: The daily and weekly for the broken graph, and also the daily for the simple graph that works.

What do I need to do to get a graph as smooth in area as the working one, with different colors for the subcategories of mail making up the total?

Thanks in advance...

Randy Rue
Attachments
daily-broken.png
daily-broken.png (6.41 KiB) Viewed 3534 times
weekly-broken.png
weekly-broken.png (7.67 KiB) Viewed 3534 times
daily-pretty.png
daily-pretty.png (4.38 KiB) Viewed 3534 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Area followed by Stack followed by Stack will fix.

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?
rrue
Posts: 4
Joined: Tue Nov 30, 2004 6:17 pm

Post by rrue »

This is what I'm running now, actually. Item #1 is area, Items #2 and #3 are stacks...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Do an RRD Dump. The RRD's should be of Type -> GUAGE

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