|
From: Reinhard S. <Rei...@te...> - 2008-07-29 17:27:51
|
Daniel Rossi wrote: > 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 ? Please be aware of the fact, that commonly COUNTERs have to be read as "value per second". To get "value per minute", you'll have to multiply by 60. To get "value per interval" (where "interval" is assumed to be 300), multiply by 300. That's a guess, for sure. > >> >> 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 see comments below > , 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. That's doable, but first let's get the correct numbers. Then, we'll cope with the format of numbers > > > /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 \ this is the rra for CF AVERAGE > DEF:b="/var/www/web4/web/rra/ > localhost_activeconnections_154.rrd":MaxConnections:LAST \ this is the rra for CF LAST > DEF:c="/var/www/web4/web/rra/ > localhost_activeconnections_154.rrd":MaxConnections:MIN \ this is the rra for CF MIN > DEF:d="/var/www/web4/web/rra/ > localhost_activeconnections_154.rrd":MaxConnections:MAX \ this is the rra for CF 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" > It would be nice to see the debug for the data source to see, if all CFs are present. > > 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. It's a known fact, not supposed to be a bug but more of a "missing feature". There's a well know but purely manual workaround that may help. Please create the FIRST graph as usual (Create Graphs for this Host). This will not only create the graph, but the data source and rrd file as well. The next graphs will be created from "Graph Management". Provide the Graph Template and name the Host. Then, please associate the now existing datra sources to the new graph. This will avoid creating new data sources. Reinhard |