1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
|
<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
<refentry>
<refmeta>
<refentrytitle>
<application>flow-export</application>
</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>
<application>flow-export</application>
</refname>
<refpurpose>
Export flow-tools files into other NetFlow packages.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>flow-export</command>
<arg>-h</arg>
<arg>-d<replaceable> debug_level</replaceable></arg>
<arg>-f<replaceable> format</replaceable></arg>
<arg>-m<replaceable> mask_fields</replaceable></arg>
<arg>-u<replaceable> user:password:host:port:name:table</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
The <command>flow-export</command> utility will convert flow-tools
flow files to ASCII CSV, cflowd, pcap, wire, mySQL, and PGSQL format.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>-d<replaceable> debug_level</replaceable></term>
<listitem>
<para>
Enable debugging.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-f<replaceable> format</replaceable></term>
<listitem>
<para>
Export format. Supported formats are:
0 cflowd
1 pcap
2 ASCII CSV
3 MySQL
4 wire
5 PGSQL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Display help.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-m<replaceable> mask_fields</replaceable></term>
<listitem>
<para>
Select fields for MySQL, PostgresSQL, cflowd, and ASCII formats. The
<replaceable>mask_fields</replaceable>
is built from a bitwise OR of the following:
</para>
<para>
<screen>
UNIX_SECS 0x0000000000000001LL
UNIX_NSECS 0x0000000000000002LL
SYSUPTIME 0x0000000000000004LL
EXADDR 0x0000000000000008LL
DFLOWS 0x0000000000000010LL
DPKTS 0x0000000000000020LL
DOCTETS 0x0000000000000040LL
FIRST 0x0000000000000080LL
LAST 0x0000000000000100LL
ENGINE_TYPE 0x0000000000000200LL
ENGINE_ID 0x0000000000000400LL
SRCADDR 0x0000000000001000LL
DSTADDR 0x0000000000002000LL
SRC_PREFIX 0x0000000000004000LL
DST_PREFIX 0x0000000000008000LL
NEXTHOP 0x0000000000010000LL
INPUT 0x0000000000020000LL
OUTPUT 0x0000000000040000LL
SRCPORT 0x0000000000080000LL
DSTPORT 0x0000000000100000LL
PROT 0x0000000000200000LL
TOS 0x0000000000400000LL
TCP_FLAGS 0x0000000000800000LL
SRC_MASK 0x0000000001000000LL
DST_MASK 0x0000000002000000LL
SRC_AS 0x0000000004000000LL
DST_AS 0x0000000008000000LL
IN_ENCAPS 0x0000000010000000LL
OUT_ENCAPS 0x0000000020000000LL
PEER_NEXTHOP 0x0000000040000000LL
ROUTER_SC 0x0000000080000000LL
EXTRA_PKTS 0x0000000100000000LL
MARKED_TOS 0x0000000200000000LL
</screen>
</para>
<para>
When exporting to cflowd format the <replaceable>mask_fields</replaceable>
field is the cflowd mask which is defined as the following:
</para>
<para>
<screen>
ROUTERMASK 0x00000001
SRCIPADDRMASK 0x00000002
DSTIPADDRMASK 0x00000004
INPUTIFINDEXMASK 0x00000008
OUTPUTIFINDEXMASK 0x00000010
SRCPORTMASK 0x00000020
DSTPORTMASK 0x00000040
PKTSMASK 0x00000080
BYTESMASK 0x00000100
IPNEXTHOPMASK 0x00000200
STARTTIMEMASK 0x00000400
ENDTIMEMASK 0x00000800
PROTOCOLMASK 0x00001000
TOSMASK 0x00002000
SRCASMASK 0x00004000
DSTASMASK 0x00008000
SRCMASKLENMASK 0x00010000
DSTMASKLENMASK 0x00020000
TCPFLAGSMASK 0x00040000
INPUTENCAPMASK 0x00080000
OUTPUTENCAPMASK 0x00100000
PEERNEXTHOPMASK 0x00200000
ENGINETYPEMASK 0x00400000
ENGINEIDMASK 0x00800000
INDEX_V1_MASK 0x00043FFF
INDEX_V5_MASK 0x00C7FFFF
INDEX_V6_MASK 0x00FFFFFF
INDEX_V7_MASK 0x00C7FFFF
INDEX_V8_1_MASK 0x00C0CD99
INDEX_V8_2_MASK 0x00C00DE1
INDEX_V8_3_MASK 0x00C14D8B
INDEX_V8_4_MASK 0x00C28D95
INDEX_V8_5_MASK 0x00C3CD9F
</screen>
</para>
<para>
The default value is all fields applicable to the the flow file, or
the cflowd INDEX mask applicabable to the export format.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-u<replaceable> user:password:host:port:name:table</replaceable></term>
<listitem>
<para>
Configure MySQL or PostgresSQL Access.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<informalexample>
<para>
Convert the flow-tools file <filename>flows</filename> to the cflowd
file <filename>flows.cflowd</filename>. Include all fields.
</para>
<para>
<command>flow-export -f0 < flows > flows.cflowd</command>
</para>
</informalexample>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<informalexample>
<para>
Convert the flow-tools file <filename>flows</filename> to the ASCII. Include
the SRCADDR and DSTADDR fields.
</para>
<para>
<command>flow-export -f2 -m0x3000 < flows > flows.ascii</command>
</para>
</informalexample>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<informalexample>
<para>
Export the flow-tools file <filename>flows</filename> to an MySQL Database.
Include only SRCADDR, DSTADDR and DOCTETS.
</para>
<para>
<command>flow-export -f3 -mSRCADDR,DSTADDR,DOCTETS -u "user:password:host:port:name:table" < flows </command>
</para>
</informalexample>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
The pcap format is a hack.
</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>
<author>
<firstname>Mark</firstname>
<surname>Fullmer</surname>
</author>
<email>maf@splintered.net</email>
</para>
<para>
Database Support:
<author>
<firstname>William Emmanuel</firstname>
<surname>Yu</surname>
</author>
<email>wyu@ateno.edu</email>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<application>flow-tools</application>(1)
</para>
</refsect1>
</refentry>
|