Graph minimum and maximums

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

Moderators: Developers, Moderators

Post Reply
mahlerrd
Posts: 14
Joined: Mon Nov 14, 2005 11:58 am

Graph minimum and maximums

Post by mahlerrd »

I'm trying to create graphs of network traffic that have a minimum amount of bandwidth showing, yet will still expand beyond that.

I'll describe further since I'm sure the above is unclear. I'd like to have my traffic graphs by default show, say, 100kB/s of bandwidth no matter how little bandwidth is being used. BUT, if port x's max usage this period was 5MB/s, the graph should scale upwards to include it. In other words, the Y axis shouldn't ever shrink below a particular logical threshold. This way, if I glance down a list of interfaces, I can immediately see ones with little to no activity instead of having to check out the scale on the Y axis first.

I've fiddled with the --alt-autoscale-max and other bits in the graph template, but I can't get it to do quite what I want. I'm not even sure this is possible, but I thought someone might have a solution for me.

An alternative has popped into my mind while writing this. Perhaps there's a way to lightly color code the background of the graph or something based on something like the 95th percentile? Like the graph could be white if the 95th % is below 100kb/s, light yellow if above that threshold.

An answer to either of these questions would be greatly apreciated. I'd also be willing to try other alternatives, as well.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I have no solution using scaling. But the one you talked about may work. Just include a LINE1 with Color=white and a constant value of 100k should work (LINE1 to be used with rrdtool 1.2.x, rrdtool-1.0.x should do using HRULE)
Reinhard
mahlerrd
Posts: 14
Joined: Mon Nov 14, 2005 11:58 am

Post by mahlerrd »

Great - that sounds *exactly* like what I wanted!

I'll give it a shot later today when I get a chance. Thanks!
mahlerrd
Posts: 14
Joined: Mon Nov 14, 2005 11:58 am

Post by mahlerrd »

I can't get that to work. I've tried your suggestion and also tried some variations.

When I use a white hrule at 100000, on graphs taller than 100,000 I see a thin white line replacing the regular thin orange line and which cuts across my graphs. Great. But, on graphs that are smaller (<100,000), it changes nothing.

Changing the hrule into a line1 just gets me a white line overlaid over the existing data if I use a datasource, and does exactly like the hrule when I set it to to a datasource of None. Neither keeps the graph from collapsing smaller than 100k.

I've changed the line to red for the time being (which at least helps me to pick out the graphs), but I'm still looking for a solution.

BTW, am using cacti-0.8.6g_41 w/ rrdtool-1.2.11 on FreeBSD 6.0.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So the first shot was wrong. Let me think about this, but I need some time. Currently, I'm thinking about making a CDEF, Color=white, which represents the MAX of 100,000 and the CURRENT_DATA_SOURCE. Perhaps this may work. Or google around in the rrdtool_users mailing list ...
Reinhard
mahlerrd
Posts: 14
Joined: Mon Nov 14, 2005 11:58 am

Post by mahlerrd »

(Post edited by author to clean up and make "right")

Ah. That did the trick.

Code: Select all

cdef=CURRENT_DATA_SOURCE,100000,MAX
And then add said CDEF to the graph template as a line1 with color white. Make sure it's the first item (so it draws behind everything else).
Attachments
The Result
The Result
min_graph_4.JPG (90.51 KiB) Viewed 1494 times
The Graph Template Item in detail
The Graph Template Item in detail
min_graph_3.JPG (52.92 KiB) Viewed 1494 times
The Graph Template
The Graph Template
min_graph_2.JPG (42.36 KiB) Viewed 1494 times
The CDEF
The CDEF
min_graph_1.JPG (29.04 KiB) Viewed 1494 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests