|
From: Daniel R. <sp...@el...> - 2008-07-29 16:22:30
|
On 30/07/2008, at 2:06 AM, Reinhard Scheck wrote: > Daniel Rossi wrote: >> Hi there, im trying to build graphs to graph information from a >> system >> which produces totals for current total connections (counter), >> current >> active connections and current max connections. How do i get it on >> the >> graph so its not calculated as averages but as the actual numbers ? > > You're really sure, that "current total connections" is a COUNTER, > not a GAUGE? > Very unlikely. Typo, its the total connections for the lifetime of the server online and yes its a counter. ActiveConnections is a gauge. It's storing the values in the rrd like 1.9 instead of the real value which is 100 even when running via command line. So its something ive done wrong in cacti, or the rrd is being built incorrectly for what i want it to do ? > > > Next, I suppose that there's still an issue understanding rrdtool > consolidation/normalization (sorry, no offense). No offense taken, i don't understand it at all and to be frank i'd rather not and was trying to avoid having to setup these custom graphs, its taken me 2 weeks just to setup graphs after building the custom script. I'm guessing I should just use the command line tools instead of a gui if i need to learn it. It took a while to work out cacti and opennms was more of a nightmare, now the problem is working out how to store / display the data correctly even when copying similar graphs. I've connected a live server now so hopefully i get more active data coming into a demo graph ! > You can't avoid > consolidation/normalization. > Normalization is performed, if the rrdtool update timestamp has an > offset from > an exact "step" boundary (by default: every 300 sec.). E.g. > timestamps 302, 602, > 902 are exactly 300 sec apart but "off boundary". 300, 600, 900 > would be without > offset. There's no way to force cacti to work only "on boundary". > > Consolidation is performed to "compress" data in two situations > - Historical consolidation: Squeeze data e.g. of the last year into > a single rra > - "Graphical" consolidation: Print a graph of "n pixels width" using > ">n data > points". > > Many users try to avoid "historical consolidation" by defining huge > rra's and > omitting CDPs per PDP > 1. But they run into "graphical > consolidation" if > viewing e.g. a year's worth of data. There's no escape from > consolidation with > rrdtool. > > Solution: make rrdtool consolidate the "right way", e.g. use CF=MAX > for "max > connections" Here is a generate graph command, i think the CF is AVERAGE here, i also want it to show the total as a line somewhere or just somewhere in the legend at the least, current active and max concurrent connections are the interesting ones here. I also dont want the rrdtool to display things like M / GB in the y axis and legend or whatever thinking it's memory usage just a raw number. /usr/bin/rrdtool graph - \ --imgformat=PNG \ --start=-86400 \ --end=-300 \ --title="Localhost - Red5 - Connections" \ --base=1000 \ --height=120 \ --width=500 \ --alt-autoscale-max \ --lower-limit=1 \ --vertical-label="connections" \ --slope-mode \ --font TITLE:12: \ --font AXIS:8: \ --font LEGEND:10: \ --font UNIT:8: \ DEF:a="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":MaxConnections:AVERAGE \ DEF:b="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":MaxConnections:LAST \ DEF:c="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":MaxConnections:MIN \ DEF:d="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":MaxConnections:MAX \ DEF:e="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":ActiveConnections:AVERAGE \ DEF:f="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":ActiveConnections:LAST \ DEF:g="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":ActiveConnections:MIN \ DEF:h="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":ActiveConnections:MAX \ DEF:i="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":TotalConnections:AVERAGE \ DEF:j="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":TotalConnections:LAST \ DEF:ba="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":TotalConnections:MIN \ DEF:bb="/var/www/web4/web/rra/ localhost_activeconnections_154.rrd":TotalConnections:MAX \ LINE1:a#FF0000FF:"Max" \ GPRINT:b:LAST:" Current\:%8.0lf" \ GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:d:MAX:"Maximum\:%8.0lf" \ AREA:e#0000FFFF:"Active" \ GPRINT:f:LAST:"Current\:%8.0lf" \ GPRINT:e:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:h:MAX:"Maximum\:%8.0lf" \ LINE3:i#00FF00FF:"Total" \ GPRINT:j:LAST:" Current\:%8.0lf" \ GPRINT:i:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:bb:MAX:"Maximum\:%8.0lf" here is another one i have going but yet to get data for it yet, its for java memory utilization /usr/bin/rrdtool graph - \ --imgformat=PNG \ --start=-86400 \ --end=-300 \ --title="Localhost - Red5 - JVM Memory" \ --base=1024 \ --height=120 \ --width=500 \ --alt-autoscale-max \ --lower-limit=0 \ --vertical-label="" \ --slope-mode \ --font TITLE:12: \ --font AXIS:8: \ --font LEGEND:10: \ --font UNIT:8: \ DEF:a="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalMemorySize:AVERAGE \ DEF:b="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalMemorySize:LAST \ DEF:c="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalMemorySize:MIN \ DEF:d="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalMemorySize:MAX \ DEF:e="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeMemorySize:AVERAGE \ DEF:f="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeMemorySize:LAST \ DEF:g="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeMemorySize:MIN \ DEF:h="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeMemorySize:MAX \ DEF:i="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalSwapSpaceSize:AVERAGE \ DEF:j="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalSwapSpaceSize:LAST \ DEF:ba="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalSwapSpaceSize:MIN \ DEF:bb="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":TotalSwapSpaceSize:MAX \ DEF:bc="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeSwapSpaceSize:AVERAGE \ DEF:bd="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeSwapSpaceSize:LAST \ DEF:be="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeSwapSpaceSize:MIN \ DEF:bf="/var/www/web4/web/rra/ localhost_totalswapspacesize_156.rrd":FreeSwapSpaceSize:MAX \ CDEF:cdefe=a,e,- \ CDEF:cdeff=a,f,- \ CDEF:cdefh=a,h,- \ CDEF:cdefbg=d,bc,- \ CDEF:cdefbh=d,bd,- \ CDEF:cdefbj=d,bf,- \ LINE1:a#FF0000FF:"Max" \ GPRINT:b:LAST:" Current\:%8.2lf %s" \ GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:d:MAX:"Maximum\:%8.2lf %s\n" \ AREA:cdefe#0000FFFF:"Used" \ GPRINT:cdeff:LAST:" Current\:%8.2lf %s" \ GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:cdefh:MAX:"Maximum\:%8.2lf %s\n" \ AREA:e#00FF00FF:"Free" \ GPRINT:f:LAST:" Current\:%8.2lf %s" \ GPRINT:e:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:h:MAX:"Maximum\:%8.2lf %s\n" \ LINE2:i#ED7600FF:"Max Swap" \ GPRINT:j:LAST:" Current\:%8.2lf %s" \ GPRINT:i:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:bb:MAX:"Maximum\:%8.2lf %s\n" \ AREA:cdefbg#002A97FF:"Used Swap" \ GPRINT:cdefbh:LAST:"Current\:%8.2lf %s" \ GPRINT:cdefbg:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:cdefbj:MAX:"Maximum\:%8.2lf %s" \ AREA:bc#009485FF:"Free Swap" \ GPRINT:bd:LAST:"Current\:%8.2lf %s" \ GPRINT:bc:AVERAGE:"Average\:%8.2lf %s" \ GPRINT:bf:MAX:"Max Swap%8.2lf %s\n" The other thing id like to be able is be able to share datasources data templates across graphs. Ie i have a data template with multiple fields set, 3 graphs use different fields within it. The problem with this is when i go to add each graph it duplicates the datasource trying to use its own. Is there a fix for this I believe this is a known problem. |