|
|
| Author |
Message |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2235 Location: Carlisle, PA
|
Posted: Sun Sep 14, 2003 6:08 pm Post subject: |
|
|
| atrocity wrote: | ehm, excuse my stupid question, but this summation, is it IN the graphs ?
If yes, then it's ok ... it's working.
But what i really want, is the possibility to put tables, with the summary of the trafic in numbers...
I have a nice PHP script, that can summarize the trafic. You can choose to see the results for a period of days, or for a whole mounth, also a year if you collected the data... Really, i will appreciate if something like that can be done in Cacti, because actually i continue to use MRTG, only for that feature ....
I will be more then happy to share this script, if someone think that it can be used / converted to and for Cacti
Jean |
I actually wrote a very similar feature for an ISP/colo that I was doing some work for. It is a pretty cool idea; my biggest concern is where to put it in the UI I could write an option whether to turn it on or off depending on how many users would benefit from such a feature. Thoughts?
-Ian
|
|
| Back to top |
|
 |
atrocity
Joined: 26 Aug 2003 Posts: 18
|
Posted: Sun Sep 14, 2003 6:14 pm Post subject: |
|
|
It can be simply under the detailed graph pages, no ?
Or, if it's possible, create a brand new feature in cacti....
Can you send me that script, to compare it with my one ?
Thanks
Jean
|
|
| Back to top |
|
 |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2235 Location: Carlisle, PA
|
Posted: Sun Sep 14, 2003 6:18 pm Post subject: |
|
|
Yeah, that's definitely one place it could go. I would send you the work I did previously, but it is not an isolated script and fairly tied into Cacti itself. What I did for them was basically create a table that gave GB transfered for each month for each user that logged in.
-Ian
|
|
| Back to top |
|
 |
atrocity
Joined: 26 Aug 2003 Posts: 18
|
Posted: Sun Sep 14, 2003 6:33 pm Post subject: |
|
|
I think that if there are 2 tables, under the detailed graphs pages, it can be enough.... Something like :
Current mounth traffic : xyz Gb total
(then the last mounths like)
08 : xyz Gb total
07 : xyz Gb total
06 : xyz Gb total
05 : xyz Gb total
04 : xyz Gb total
03 : xyz Gb total
02 : xyz Gb total
01 : xyz Gb total
But, like that, it's not really easy to manage...
Will it not be a better idea, to make a new link appear in the detailed graphs, going to a page with a form, and the user can chose what he want to see ?
Like that, you can put the 'Current mounth traffic'
Jean
|
|
| Back to top |
|
 |
atrocity
Joined: 26 Aug 2003 Posts: 18
|
Posted: Sun Sep 14, 2003 6:35 pm Post subject: |
|
|
Currently, i'm only interested to see this stats for each of the switch ports that i monitor... But feel free to extend it
Jean
|
|
| Back to top |
|
 |
mike_tcis
Joined: 17 Jul 2002 Posts: 12 Location: Tulsa, OK
|
Posted: Thu Sep 25, 2003 9:51 pm Post subject: |
|
|
| raX wrote: | Yeah, that's definitely one place it could go. I would send you the work I did previously, but it is not an isolated script and fairly tied into Cacti itself. What I did for them was basically create a table that gave GB transfered for each month for each user that logged in.
-Ian |
Yea, something like that would be very useful. Right now, the summation feature works fine on the graphs themselves, but I'm still forced to use MRTS to get traffic sum data for specific time periods, e.g. per day, week, month, with the ability to go back several months.
--Mike
|
|
| Back to top |
|
 |
skt
Joined: 06 Nov 2003 Posts: 14
|
Posted: Thu Nov 20, 2003 9:12 am Post subject: XLM File |
|
|
Anyone have an XML file for doing the graph sums. Just upgraded to 0.8.4 and would like to inport this feature.
Thanks!
|
|
| Back to top |
|
 |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2235 Location: Carlisle, PA
|
Posted: Fri Nov 21, 2003 12:37 am Post subject: |
|
|
I attached the total bandwidth in bits and bytes that comes with new versions of Cacti.
-Ian
| Description: |
| Interface - Traffic (bytes/sec, Total Bandwidth) |
|
 Download |
| Filename: |
cacti_graph_template_interface_traffic_bytessec_total_bandwidth.xml |
| Filesize: |
13.79 KB |
| Downloaded: |
618 Time(s) |
| Description: |
| Interface - Traffic (bits/sec, Total Bandwidth) |
|
 Download |
| Filename: |
cacti_graph_template_interface_traffic_bitssec_total_bandwidth.xml |
| Filesize: |
14.77 KB |
| Downloaded: |
585 Time(s) |
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Fri Nov 21, 2003 9:05 am Post subject: trying out the new templates |
|
|
I imported the new templates into Cacti (.084 from upgrade) and selected 1 interface from a polling host as a test using the bits_sec_total template.
I can see the top level graph fine. It appears to be working correctly. I do not get graphs when I drill down on the graph in question.
Given the fact that the top level graph works, am I just being impatient and the other graphs will show up in a while?
Here is the source:
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source
/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="Monitor2 BigBrother/Nedi Server - Traffic - 172.20.1.204 (eth1)" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/usr/local/cacti/rra/monitor2_bigbrothernmis_server_traffic_in_952.rrd":traffic_in:AVERAGE \
DEF:b="/usr/local/cacti/rra/monitor2_bigbrothernmis_server_traffic_in_952.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefi=a,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In: 0 bytes\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out: 0 bytes"
|
|
| Back to top |
|
 |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2235 Location: Carlisle, PA
|
Posted: Wed Nov 26, 2003 3:55 pm Post subject: Re: trying out the new templates |
|
|
| egarnel wrote: | Here is the source:
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source |
If you see this error, it probably means that your RRD file does not exist. Double check to make sure you have a file at /usr/local/cacti/rra/monitor2_bigbrothernmis_server_traffic_in_952.rrd.
-Ian
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Mon Dec 01, 2003 8:35 am Post subject: Files present |
|
|
| The file does indeed exist. The weird thing is that the top level graph shows up and seems to be accurate. This is on a box that has been upgraded to 0.8.4 and has had the modification previously mentioned in this thread.
|
|
| Back to top |
|
 |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2235 Location: Carlisle, PA
|
Posted: Tue Dec 02, 2003 12:30 am Post subject: |
|
|
Typically when the graph looks fine at the top level, but not in detail, it indicates a problem with the graph legend. When a graph is drawn as a top level graph, Cacti doesn't even bother with the graph legend code. Since your bandwidth summation items are both COMMENT types, they both reside on the legend.
In the spirit of debugging, try replacing your 'lib/rrd.php' file with the following:
http://www.raxnet.net/downloads/patches/2003-12-01/rrd.php.txt
Then show me what you get after clicking "view source" for the broken summation graph.
-Ian
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Tue Dec 02, 2003 9:10 am Post subject: results of debug |
|
|
FETCH ARRAY:
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source
FETCH ARRAY:
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source
/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="Monitor2 BigBrother/Nedi Server - Traffic - 172.20.1.204 (eth1)" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/usr/local/cacti/rra/monitor2_bigbrothernmis_server_traffic_in_952.rrd":traffic_in:AVERAGE \
DEF:b="/usr/local/cacti/rra/monitor2_bigbrothernmis_server_traffic_in_952.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefi=a,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In: 0 bytes\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out: 0 bytes"
|
|
| Back to top |
|
 |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2235 Location: Carlisle, PA
|
Posted: Thu Dec 04, 2003 5:20 pm Post subject: |
|
|
I have a feeling that your problem is a result of not having a data source selected for the two COMMENT graph items.
Go to "Graph Templates" and select "Interface - Traffic (bits/sec, Total Bandwidth)". Click "Inbound Data Source", make sure that item #5 is selected, and click "Save". Now click "Outbound Data Source", make sure that item #10 is selected, and click "Save".
Let me know if this helps.
-Ian
|
|
| Back to top |
|
 |
sini Cacti User
Joined: 24 Nov 2003 Posts: 55 Location: Hungary
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|