Debian Codegraph @

man/man1/rabins.1

raw
1 .\"
2 .\" Argus-5.0 Software
3 .\" Copyright (c) 2000-2024 QoSient, LLC
4 .\" All rights reserved.
5 .\"
6 .\"
7 .TH RABINS 1 "12 August 2023" "rabins 5.0.3"
8 .SH NAME
9 \fBrabins\fP \- process \fBargus(8)\fP data within specified bins.
10 .SH SYNOPSIS
11 .B rabins
12 \fB[\-B\fB \fIsecs\fP\fB] \-M\fP \fIsplitmode\fP [\fIoptions\fP]] [\fBraoptions\fP] [\fB--\fP \fIfilter-expression\fP]
13 .SH DESCRIPTION
14 .IX "rabins command" "" "\fBrabins\fP \(em argus data"
15 .LP
16 \fBRabins\fP reads
17 .BR argus
18 data from an \fIargus-data\fP source, and adjusts the data so that
19 it is aligned to a set of bins, or slots, that are based on either time,
20 input size, or count. The resulting output is split, modified, and
21 optionally aggregated so that the data fits to the constraints of the
22 specified bins. \fBrabins\fP is designed to be a combination of
23 \fBrasplit\fP and \fBracluster\fP, acting on multiple contexts of argus
24 data.
25
26 The principal function of \fBrabins\fP is to align input data to a series
27 of bins, and then process the data within the context of each bin. This is
28 the basis for real-time stream block processing. Time series stream block
29 processing is cricital for flow data graphing, comparing, analyzing, and correlation.
30 Fixed load stream block processing, based on the number of argus data records
31 ('count'), or a fixed volume of data ('size') allows for control of resources
32 in processing. While load based options are very useful, they are rather esoteric.
33 See the online examples and rasplit.1 for examples of using these modes of operation.
34
35 .SH Time Series Bins
36 Time series bin'ing is specified using the \fB-M\fP \fItime\fP option.
37 Time bins are specified by the size and granularity of the time bin.
38 The granularity, 's'econds, 'm'inutes, 'h'ours, 'd'ays, 'w'eeks, 'M'onths,
39 and 'y'ears, dictates where the bin boundaries lie. To ensure that 0.5d and 12h
40 start on the same point in time, second, minute, hour, and day based bins
41 start at midnight, Jan 1st of the year of processing. Week, month and year
42 bins all start on natural time boundaries, for the period.
43
44 \fBrabins\fP provides a separate processing context for each bin, so that
45 aggregation and sorting occur only within the context of each time period.
46 Records are placed into bins based on load or time. For load based bins,
47 input records are processed in received order and are not modified. When
48 using time based bins, records are placed into bins based on the starting
49 time of the record. By default, records that span a time boundary are split
50 into as many records as needed to fit the record into appropriate bin sizes,
51 using the algorithms used by \fBrasplit.1\fP. Metrics are distributed
52 uniformly within all the appropriate bins. The result is a series of data
53 and/or fragments that are time aligned, appropriate for time seried analysis,
54 and visualization.
55
56 When a record is split to conform to a time series bin, the resulting starting
57 and ending timestamps may or may not coincide with the timestamps of the bins
58 themselves. For some applications, this treatment is critical to the analytics
59 that are working on the resulting data, such as transaction duration, and
60 flow traffic burst behavior. However, for other analytics, like average load,
61 and rate analysis and reporting, the timestamps need to be modified so that
62 they reflect the time range of the actual time bin boundaries. Rabins
63 supports the optional \fBhard\fP option to specify that timestamps should
64 conform to bin boundaries. One of the results of this is that all durations
65 in the reported records will be the bin duration. This is extremely important
66 when processing certain time series metrics, like load.
67
68 .SH Load Based Bins
69 Load based bin'ing is specified using the \fB-M size\fP or \fB-M count\fP
70 options. Load bins are used to constrain the resource used in bin
71 processing. So much load is input, aggregation is performed on the input
72 load, and when a threshold is reached, the entire aggregation cache is
73 dumped, reinitiallized, and reused. These can be used effectively to
74 provide realtime data reduction, but within a fixed amount of memory.
75
76
77 .SH Output Processing
78 \fBrabins\fP has two basic modes of output, the default holds all output in main memory
79 until EOF is encountered on input, where each sorted bin is written out. The second
80 output mode, has \fBrabins\fP writing out the contents of individual sorted bins,
81 periodically based on a holding time, specified using the \fI-B secs\fP option.
82 The \fIsecs\fP value should be chosen such that \fBrabins\fP will have seen all
83 the appropriate incoming data for that time period. This is determined by the
84 ARGUS_FLOW_STATUS_INTERVAL used by the collection of argus data sources in the
85 input data stream, as well as any time drift that may exist amoung argus data
86 processin elements. When there is good time sync, and with an ARGUS_FLOW_STATUS_INTERVAL
87 of 5 seconds, appropriate \fIsecs\fP values are between 5-15 seconds.
88
89 The output of \fBrabins\fP when using the \fI-B secs\fP option, is appropriate to drive
90 a number of processing elements, such as near real-time visualizations and alarm and
91 reporting.
92
93
94 .SH Output Stream
95
96 Like all \fBra.1\fP client programs, the output of \fBrabins.1\fP is an argus
97 data stream, that can be written as binary data to a file or standard output,
98 or can be printed. \fBrabins\fP supports all the output functions provided by
99 \fBrasplit.1\fP.
100
101
102 The output files name consists of a prefix, which is specified using
103 the \fI-w\fP \fIra option\fP, and for all modes except \fBtime\fP mode,
104 a suffix, which is created for each resulting file. If no prefix is
105 provided, then \fBrabins\fP will use 'x' as the default prefix. The suffix
106 that is used is determined by the mode of operation. When \fBrabins\fP
107 is using the default count mode or the size mode, the suffix is a group
108 of letters 'aa', 'ab', and so on, such that concatenating the output files
109 in sorted order by file name produces the original input file. If
110 \fBrabins\fP will need to create more output files than are allowed
111 by the default suffix strategy, more letters will be added, in order
112 to accomodate the needed files.
113
114 When \fBrabins\fP is spliting based on time, \fBrabins\fP uses a default
115 extension of %Y.%m.%d.%h.%m.%s. This default can be overrided by adding
116 a '%' extension to the name provided using the \fI-w\fP option.
117
118 When standard out is specified, using \fI-w -\fP, \fBrabins\fP
119 will output a single \fBargus-stream\fP with START and STOP argus management
120 records inserted appropriately to indicate where the output is split.
121 See \fBargus(8)\fP for more information on output stream formats.
122
123 When \fBrabins\fP is spliting on output record count (the default), the
124 number of records is specified as an ordinal counter, the default is
125 1000 records. When \fBrabins\fP is spliting based on the maximum output
126 file size, the size is specified as bytes. The scale of the bytes can be
127 specified by appending 'b', 'k' and 'm' to the number provided.
128
129 When \fBrabins\fP is spliting base on time, the time period is specified
130 with the option, and can be any period based in seconds (s), minutes (m),
131 hours (h), days (d), weeks (w), months (M) or years (y). \fBRabins\fP
132 will create and modify records as required to split on prescribed time
133 boundaries. If any record spans a time boundary, the record is split
134 and the metrics are adjusted using a uniform distribution model to
135 distribute the statistics between the two records.
136
137 See \fBrasplit.1\fP for specifics.
138
139
140 .SH RABINS SPECIFIC OPTIONS
141 \fBrabins\fP, like all ra based clients, supports a number of \fBra options\fP including
142 remote data access, reading from multiple files and filtering of input argus
143 records through a terminating filter expression. Rabins also provides
144 all the functions of \fBracluster.1\fP and \fBrasplit.1\fP, for processing and
145 outputing data. \fBrabins\fP specific options are:
146
147 .TP 5
148 .BI \-B "\| secs\^"
149 Holding time in seconds before closing a bin and outputing its contents.
150 .PP
151 .TP 5
152 .BI \-M "\| splitmode\^"
153 Supported spliting modes are:
154 .PP
155 .RS
156 .TP 5
157 .B time <n[smhdwMy]>
158 bin records into time slots of n size. This is used for time series
159 analytics, especially graphing. Records, by default are split, so that
160 their timestamps do not span the time range specified. Metrics are
161 uniformly distributed among the resulting records.
162 .TP
163 .B count <n[kmb]>
164 bin records into chunks based on the number of records. This is used
165 for archive management and parallel processing analytics, to limit the
166 size of data processing to fixed numbers of records.
167 .TP
168 .B size <n[kmb]>
169 bin records into chunks based on the number of total bytes. This is used
170 for archive management and parallel processing analytics, to limit the
171 size of data processing to fixed byte limitations.
172 .RE
173 .TP 5
174 .BI \-M "\| modes\^"
175 Supported processing modes are:
176 .PD 0
177 .PP
178 .RS
179 .TP 5
180 .B hard
181 split on hard time boundaries. Each flow records start and stop times will
182 be the time boundary times. The default is to use the original start and stop
183 timestamps from the records that make up the resulting aggregation.
184 .TP
185 .B nomodify
186 Do not split the record when including it into a time bin. This allows a time
187 bin to represent times outside of its defintion. This option should
188 not be used with the 'hard' option, as you will modify metrics and semantics.
189 .RE
190 .TP 5
191 .BI \-m "\| aggregation object\^"
192 Supported aggregation objects are:
193 .PD 0
194 .PP
195 .RS
196 .TP 15
197 .B none
198 use a null flow key.
199 .TP
200 .B srcid
201 argus source identifier.
202 .TP
203 .B smac
204 source mac(ether) addr.
205 .TP
206 .B dmac
207 destination mac(ether) addr.
208 .TP
209 .B soui
210 oui portion of the source mac(ether) addr.
211 .TP
212 .B doui
213 oui portion of the destination mac(ether) addr.
214 .TP
215 .B smpls
216 source mpls label.
217 .TP
218 .B dmpls
219 destination label addr.
220 .TP
221 .B svlan
222 source vlan label.
223 .TP
224 .B dvlan
225 destination vlan addr.
226 .TP
227 .B saddr/[l|m]
228 source IP addr/[cidr len | m.a.s.k].
229 .TP
230 .B daddr/[l|m]
231 destination IP addr/[cidr len | m.a.s.k].
232 .TP
233 .B matrix/l
234 sorted src and dst IP addr/cidr len.
235 .TP
236 .B proto
237 transaction protocol.
238 .TP
239 .B sport
240 source port number. Implies use of 'proto'.
241 .TP
242 .B dport
243 destination port number. Implies use of 'proto'.
244 .TP
245 .B stos
246 source TOS byte value.
247 .TP
248 .B dtos
249 destination TOS byte value.
250 .TP
251 .B sttl
252 src -> dst TTL value.
253 .TP
254 .B dttl
255 dst -> src TTL value.
256 .TP
257 .B stcpb
258 src -> dst TCP base sequence number.
259 .TP
260 .B dtcpb
261 dst -> src TCP base sequence number.
262 .TP
263 .B inode[/l|m]]
264 intermediate node IP addr/[cidr len | m.a.s.k], source of ICMP mapped events.
265 .TP
266 .B sco
267 source ARIN country code, if present.
268 .TP
269 .B dco
270 destination ARIN country code, if present.
271 .TP
272 .B sas
273 source node origin AS number, if available.
274 .TP
275 .B das
276 destination node origin AS number, if available.
277 .TP
278 .B ias
279 intermediate node origin AS number, if available.
280 .RE
281
282 .TP 5
283 .BI \-P "\| sort field\^"
284 \fBRabins\fP can sort its output based on a sort field
285 specification. Because the \fB-m\fP option is used for
286 aggregation fields, \fB-P\fP is used to specify the
287 print priority order. See \fBrasort(1)\fP for the list of
288 sortable fields.
289
290 .TP 5
291 .BI \-w "\| filename\^"
292 \fBRabins\fP supports an extended \fI-w\fP option that allows for
293 output record contents to be inserted into the output filename.
294 Specified using '$' (dollar) notation, any printable field can be used.
295 Care should be taken to honor any shell escape requirements when
296 specifying on the command line. See \fBra(1)\fP for the list of
297 printable fields.
298
299 Another extended feature, when using \fBtime\fP mode, \fBrabins\fP
300 will process the supplied filename using \fBstrftime(3)\fP, so that
301 time fields can be inserted into the resulting output filename.
302
303 .SH INVOCATION
304 This invocation aggregates \fBinputfile\fP based on 10 minute time boundaries.
305 Input is split to fit within a 10 minute time boundary, and within those boundaries,
306 argus records are aggregated. The resulting output its streamed to a single file.
307 .nf
308
309 \fBrabins\fP -r * -M time 10m -w outputfile
310
311 .fi
312 .P
313 This next invocation aggregates \fBinputfiles\fP based on 5 minute time boundaries, and
314 the output is written to 5 minute files. Input is split such that all records
315 conform to hard 10 minute time boundaries, and within those boundaries, argus
316 records are aggregated, in this case, based on IP address matrix.
317 .P
318 The resulting output its streamed to files that are named relative to the
319 records output content, a prefix of \fI/matrix/%Y/%m/%d/argus.\fP and the suffixes \fI%H.%M.%S\fP.
320 .ft CW
321 .nf
322
323 \fBrabins\fP -r * -M hard time 5m -m matrix -w "/matrix/%Y/%m/%d/argus.%H.%M.%S"
324
325 .fi
326 .ft P
327 .P
328 This next invocation aggregates \fBinput.stream\fP based on matrix/24 into 10 second time
329 boundaries, holds the data for an additional 5 seconds after the time boundary has
330 passed, and then prints the complete sorted contents of each bin to standard output.
331 The output is printed at 10 second intervals, and the output is the content of the
332 previous 10 sec time bin. This example is meant to provide, every 10 seconds, the
333 summary of all Class C subnet activity seen. It is intended to run indefinately
334 printing out aggregated summary records. By modifying the aggregation model,
335 using the "-f racluster.conf" option, you can achieve a great deal of data reduction
336 with a lot of semantic reporting.
337
338 .nf
339 .ft CW
340 .ps 6
341 .vs 7
342
343 % \fBrabins\fP -S localhost -m matrix/24 -B 5s -M hard time 10s -p0 -s +1trans - ipv4
344 StartTime Trans Proto SrcAddr Dir DstAddr SrcPkts DstPkts SrcBytes DstBytes State
345 2012/02/15.13:37:00 5 ip 192.168.0.0/24 <-> 192.168.0.0/24 41 40 2860 12122 CON
346 2012/02/15.13:37:00 2 ip 192.168.0.0/24 -> 224.0.0.0/24 2 0 319 0 INT
347 [ 10 seconds pass]
348 2012/02/15.13:37:10 13 ip 192.168.0.0/24 <-> 208.59.201.0/24 269 351 97886 398700 CON
349 2012/02/15.13:37:10 14 ip 192.168.0.0/24 <-> 192.168.0.0/24 86 92 7814 46800 CON
350 2012/02/15.13:37:10 1 ip 17.172.224.0/24 <-> 192.168.0.0/24 52 37 68125 4372 CON
351 2012/02/15.13:37:10 1 ip 192.168.0.0/24 <-> 199.7.55.0/24 7 7 784 2566 CON
352 2012/02/15.13:37:10 1 ip 184.85.13.0/24 <-> 192.168.0.0/24 6 5 3952 2204 CON
353 2012/02/15.13:37:10 2 ip 66.235.132.0/24 <-> 192.168.0.0/24 5 6 915 3732 CON
354 2012/02/15.13:37:10 1 ip 74.125.226.0/24 <-> 192.168.0.0/24 3 4 709 888 CON
355 2012/02/15.13:37:10 3 ip 66.39.3.0/24 <-> 192.168.0.0/24 3 3 369 198 CON
356 2012/02/15.13:37:10 1 ip 192.168.0.0/24 <-> 205.188.1.0/24 1 1 54 356 CON
357 [ 10 seconds pass]
358 2012/02/15.13:37:20 6 ip 192.168.0.0/24 <-> 208.59.201.0/24 392 461 60531 623894 CON
359 2012/02/15.13:37:20 8 ip 192.168.0.0/24 <-> 192.168.0.0/24 95 111 6948 93536 CON
360 2012/02/15.13:37:20 3 ip 72.14.204.0/24 <-> 192.168.0.0/24 38 32 38568 4414 CON
361 2012/02/15.13:37:20 1 ip 17.112.156.0/24 <-> 192.168.0.0/24 26 13 21798 7116 CON
362 2012/02/15.13:37:20 2 ip 66.235.132.0/24 <-> 192.168.0.0/24 6 3 1232 4450 CON
363 2012/02/15.13:37:20 1 ip 66.235.133.0/24 <-> 192.168.0.0/24 1 2 82 132 CON
364 [ 10 seconds pass]
365 2012/02/15.13:37:30 117 ip 192.168.0.0/24 <-> 208.59.201.0/24 697 663 369769 134382 CON
366 2012/02/15.13:37:30 11 ip 192.168.0.0/24 <-> 192.168.0.0/24 147 187 11210 193253 CON
367 2012/02/15.13:37:30 1 ip 184.85.13.0/24 <-> 192.168.0.0/24 13 9 13408 9031 CON
368 2012/02/15.13:37:30 2 ip 66.235.132.0/24 <-> 192.168.0.0/24 8 7 1920 11563 CON
369 2012/02/15.13:37:30 1 ip 192.168.0.0/24 <-> 207.46.193.0/24 5 3 802 562 CON
370 2012/02/15.13:37:30 1 ip 17.112.156.0/24 <-> 192.168.0.0/24 5 2 646 3684 CON
371 2012/02/15.13:37:30 2 ip 192.168.0.0/24 -> 224.0.0.0/24 2 0 382 0 REQ
372 [ 10 seconds pass]
373
374 .vs
375 .ps
376 .ft P
377 .fi
378
379 This next invocation reads IP \fBargus(8)\fP data from \fBinputfile\fP and processes,
380 the \fBargus(8)\fP data stream based on input byte size of no greater than 1 Megabyte.
381 The resulting output stream is written to a single \fIargus.out\fP data file.
382 .nf
383
384 \fBrabins\fP -r argusfile -M size 1m -s +1dur -m proto -w argus.out - ip
385
386 .fi
387
388 This invocation reads IP \fBargus(8)\fP data from \fBinputfile\fP and aggregates
389 the \fBargus(8)\fP data stream based on input file size of no greater
390 than 1K flows. The resulting output stream is printed to the screen as
391 standard argus records.
392 .nf
393
394 \fBrabins\fP -r argusfile -M count 1k -m proto -s stime dur proto spkts dpkts - ip
395
396 .fi
397
398 .SH COPYRIGHT
399 Copyright (c) 2000-2024 QoSient. All rights reserved.
400
401 .SH SEE ALSO
402 .BR ra(1),
403 .BR racluster(1),
404 .BR rasplit(1),
405 .BR rarc(5),
406 .BR argus(8),
407
408 .SH AUTHORS
409 .nf
410 Carter Bullard ([email protected]).
411 .fi