1
<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
6
<application>flow-rpt2rrd</application>
8
<manvolnum>1</manvolnum>
13
<application>flow-rpt2rrd</application>
16
Convert flow-report CSV output to RRDtool format.
22
<command>flow-rpt2rrd</command>
24
<arg>-d<replaceable> debug_level</replaceable></arg>
25
<arg>-k<replaceable> keys</replaceable></arg>
26
<arg>-K<replaceable> keys_file</replaceable></arg>
27
<arg>-f<replaceable> fields</replaceable></arg>
28
<arg>-p<replaceable> rrd_path</replaceable></arg>
29
<arg>-P<replaceable> rrd_postfix</replaceable></arg>
30
<arg>-r<replaceable> rrd_storage</replaceable></arg>
35
<title>DESCRIPTION</title>
37
The <command>flow-rpt2rrd</command> utility processes the CSV output of
38
flow-report into RRDtool format. The aggregates for a key are each
39
stored as a DS in RRD filename {rrd_path,"/",key,rrd_postfix,".rrd"}.
40
By default a DS is created for flows, octets, and packets. The key
41
must be specified, for example an ip-port report could use smtp,nntp,ssh,telnet
42
as the keys which would create a separate RRD for each key.
47
<title>OPTIONS</title>
51
<term>-d<replaceable> debug_level</replaceable></term>
54
Set debug level to debug_level (debugging code)
69
<term>-k<replaceable> keys</replaceable>|<replaceable>html</replaceable</term>
72
Comma separated list of key values. If the report has symbols
73
then the key must be the symbol, ie smtp not 25. The totals_* lines
74
may be used if they are enabled in the report. There is no default,
75
keys must be specified with -k or -K.
81
<term>-K<replaceable> keys_file</replaceable></term>
84
Load keys from <replaceable>keys_file</replaceable>. See -k.
93
Comma separated list of columns to store. Each column maps to a DS in the
94
RRD. Defaults to flows,octets,packets
103
Enable symbol table lookups. For example TCP port 25 = smtp. This will
104
result in RRD file names with the symbolic names if symbol lookups were
105
not enabled in the report.
111
<term>-p<replaceable> rrd_path</replaceable></term>
114
Set path to RRD files. Defaults to ".".
120
<term>-P<replaceable> rrd_postfix</replaceable></term>
123
Set RRD file name postfix. Defaults to "".
129
<term>-r<replaceable> rrd_storage</replaceable></term>
132
Set RRD storage for 5 minute, 30 minute, 2 hour, and 1 day databases. List
133
items are : seperated. Defaults to 600:600:600:732.
142
Enable verbose output.
151
<title>EXAMPLES</title>
154
The following example shows the combined use of flow-nfilter (inline),
155
flow-report, and flow-rpt2rrd to create an RRD depicting traffic
156
from clmbo-r4 to AS 10796 and 6478 for 2004-11-08. rrdtool graph is
157
then used to create a .png.
161
cat << EOF>report.cfg
163
include-filter nfilter.cfg
165
stat-report CLMBO-R4-TO-INTERNET-BY-DESTINATION-AS
167
filter CLMBO-R4-INTERNET-OUT
170
options +header,+xheader
173
stat-definition 5min-summaries
174
report CLMBO-R4-TO-INTERNET-BY-DESTINATION-AS
177
cat << EOF>nfilter.cfg
178
# ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.46 = so-0/0/0.0
179
filter-primitive CLMBO-R4-INTERNET
183
# Match on traffic to the Internet
184
filter-definition CLMBO-R4-INTERNET-OUT
185
match output-interface CLMBO-R4-INTERNET
190
# 5 minute flow files from flow-capture are here
191
FLOW_DATA=/flows/clmbo-r4/2004-11-08/
193
# for each 5 minute flow,aggregate with flow-report then store to RRD
194
for name in $FLOW_DATA/*; do
196
flow-report -s report.cfg -S5min-summaries < $name | flow-rpt2rrd -k10796,6478 -p rrds
199
# first flow - 0:1:23 11/8/2004
201
# last flow - 0:1:25 11/9/2004
204
rrdtool graph CLMBO-R4-TO-INTERNET.png --start $START --end $END \
205
--vertical-label "Bits/Second" --title="CLMBO-R4 TO INTERNET BY AS" \
206
DEF:AS10796in=rrds/10796.rrd:octets:AVERAGE \
207
DEF:AS6478in=rrds/6478.rrd:octets:AVERAGE \
208
CDEF:b_AS10796in=AS10796in,8,* \
209
CDEF:b_AS6478in=AS6478in,8,* \
210
LINE1:b_AS10796in#FF0000:AS10796-in \
211
LINE1:b_AS6478in#555555:AS6478-in \
222
Hard coded to expect 5 minute flow file intervals. Does not properly parse
223
flow-report time-series output.
228
<title>AUTHOR</title>
231
<firstname>Mark</firstname>
232
<surname>Fullmer</surname>
234
<email>maf@splintered.net</email>
239
<title>SEE ALSO</title>
241
<application>flow-tools</application>(1)