xtc
Joined: 12 Oct 2007 Posts: 1 Location: Frankfurt, Germany
|
Posted: Fri Oct 12, 2007 3:00 am Post subject: Solved: Extract Traffic Acc Data out of RRD´s via PHP Script |
|
|
Hi @all,
here´s a very simple php script.
you pass the month, the year and the path to a xy.rrd and the script grabs the rrd, make use of rrdtool export, extract the traffic accounting relevant data and put out a simple plain table with the data if you additionally pass the parameter "plain=1" to the script.
if not, it generates a .csv file for further use in excel or any other spreadsheet.
it doesn´t make any graphics and stuff. it just spit out relevant data for billing interface or ip-traffic out of interface traffic rrd´s.
i use it for "normal" traffic rrd´s as well as for ip-traffic rrd´s generatet with pmacct/pmacct-snmp to pass the gathered informations to any billing software.
feel free to use it, enhace it, tune it
| Description: |
|
 Download |
| Filename: |
exp_traffic.example.txt |
| Filesize: |
1.69 KB |
| Downloaded: |
77 Time(s) |
| Description: |
|
 Download |
| Filename: |
exp_traffic.php.txt |
| Filesize: |
3.03 KB |
| Downloaded: |
67 Time(s) |
|
|