FLOW-RPT2RRD(1)
β¨ NAME β¨
flow-rpt2rrd β the little glow-up machine that turns flow-report CSV output into RRDtool format π
(yes bestie, this is the FLOW-RPT2RRD(1) manual page, and we're gonna read it together, no cap)
π¦ SYNOPSIS π¦
flow-rpt2rrd [ -nv ] [ -d debug_level ] [ -k keys ] [ -K keys_file ]
[ -f fields ] [ -p rrd_path ] [ -P rrd_postfix ] [ -r rrd_storage ]
π DESCRIPTION π
okay so. The flow-rpt2rrd utility processes the CSV output of flow-report into RRDtool format. That's the whole vibe. π«Ά
The aggregates for a key are each stored as a DS in the RRD filename:
{rrd_path,"/",key,rrd_postfix,".rrd"}
By default a DS is created for flows, octets, and packets. π
The key must be specified β like, it's not optional, bestie, it's the main character here. For example an ip-port report could use smtp,nntp,ssh,telnet as the keys, which would create a separate RRD for each key. One RRD per key, they're all getting their own little moment. π
πΈ OPTIONS πΈ
-ddebug_level β set debug level to debug_level (this is the debugging code, so it's giving dev-mode energy π§)-hβ help. We love a supportive flag. π«Ά-k keys|htmlβ comma separated list of key values. If the report has symbols then the key must be the symbol, iesmtpnot25. Thetotals_*lines may be used if they are enabled in the report. There is no default β keys must be specified with-kor-K. No key, no entry. π-Kkeys_file β load keys from keys_file. See-k(same energy, different delivery method π)-fβ comma separated list of columns to store. Each column maps to a DS in the RRD. Defaults toflows,octets,packetsβ¨-nβ enable symbol table lookups. For example TCP port 25 =smtp. This will result in RRD file names with the symbolic names if symbol lookups were not enabled in the report. Cute names > numbers, lowkey. π’β‘οΈπ¬-prrd_path β set path to RRD files. Defaults to"."π-Prrd_postfix β set RRD file name postfix. Defaults to""(yes, empty, as in nothing, as in the void π³οΈ)-rrrd_storage β set RRD storage for 5 minute, 30 minute, 2 hour, and 1 day databases. List items are:separated. Defaults to600:600:600:732ποΈ-vβ enable verbose output. She talks a LOT and we respect it. π£οΈ
π EXAMPLES π
The following example shows the combined use of flow-nfilter (inline), flow-report, and flow-rpt2rrd to create an RRD depicting traffic from clmbo-r4 to AS 10796 and 6478 for 2004-11-08. rrdtool graph is then used to create a .png. Iconic pipeline behavior, honestly. π
#!/bin/sh
cat << EOF>report.cfg
include-filter nfilter.cfg
stat-report CLMBO-R4-TO-INTERNET-BY-DESTINATION-AS
type destination-as
filter CLMBO-R4-INTERNET-OUT
scale 100
output
options +header,+xheader
fields -duration
stat-definition 5min-summaries
report CLMBO-R4-TO-INTERNET-BY-DESTINATION-AS
EOF
cat << EOF>nfilter.cfg
# ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.46 = so-0/0/0.0
filter-primitive CLMBO-R4-INTERNET
type ifindex
permit 46
# Match on traffic to the Internet
filter-definition CLMBO-R4-INTERNET-OUT
match output-interface CLMBO-R4-INTERNET
EOF
mkdir rrds
# 5 minute flow files from flow-capture are here
FLOW_DATA=/flows/clmbo-r4/2004-11-08/
# for each 5 minute flow,aggregate with flow-report then store to RRD
for name in $FLOW_DATA/*; do
echo working...$name
flow-report -s report.cfg -S5min-summaries < $name | flow-rpt2rrd -k10796,6478 -p rrds
done
# first flow - 0:1:23 11/8/2004
START=1099890083
# last flow - 0:1:25 11/9/2004
END=1099976485
rrdtool graph CLMBO-R4-TO-INTERNET.png --start $START --end $END \
--vertical-label "Bits/Second" --title="CLMBO-R4 TO INTERNET BY AS" \
DEF:AS10796in=rrds/10796.rrd:octets:AVERAGE \
DEF:AS6478in=rrds/6478.rrd:octets:AVERAGE \
CDEF:b_AS10796in=AS10796in,8,* \
CDEF:b_AS6478in=AS6478in,8,* \
LINE1:b_AS10796in#FF0000:AS10796-in \
LINE1:b_AS6478in#555555:AS6478-in \
π BUGS π
- Hard coded to expect 5 minute flow file intervals. She's not flexible about this. Not even a little. π
- Does not properly parse
flow-reporttime-series output. It's giving "we tried" π
bestie, these are real caveats, ok? Don't build your whole monitoring stack on the assumption that it'll behave any differently. Noted and documented, periodt.
π AUTHOR π
Mark Fullmer <maf@splintered.net> β thank you for your service, legend π«‘
π§ SEE ALSO π§
and that's the whole page, bestie!! go forth and convert your CSV into RRDs, you absolute icon π
This was FLOW-RPT2RRD(1), dated 26 ΠΠ²Π³ΡΡΡ 2010 β yeah, the date is in Cyrillic month energy and honestly? It ate. π No cap, that's the version and date, right there in the footer, preserved forever like a little time capsule. π β¨
π¦ where this page comes from
- fedora 43: flow-tools-rrdtool 0.68.5.1-45.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: flow-tools-rrdtool 0.68.5.1-46.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms