Debian Codegraph @

man/man1/ragrep.1

raw
1 .\"
2 .\" Argus-5.0 Software
3 .\" Copyright (c) 2000-2024 QoSient, LLC
4 .\" All rights reserved.
5 .\"
6 .\"
7 .TH RAGREP 1 "15 March 2023" "ragrep 5.0.3"
8 .SH NAME
9 \fBragrep\fP \- grep \fBargus(8)\fP user captured data.
10 .SH SYNOPSIS
11 .B ragrep
12 [\fBoptions\fP] \fB\-e\fP \fIpattern\fP [\fBraoptions\fP] [\fB--\fP \fIfilter-expression\fP]
13 .br
14 .B ragrep
15 [\fBoptions\fP] \fB\-f file\fP [\fBraoptions\fP] [\fB-\fP \fIfilter-expression\fP]
16 .SH DESCRIPTION
17 .IX "ragrep command" "" "\fLragrep\fP \(em argus data"
18 .LP
19 .B Ragrep
20 reads
21 .BR argus
22 data from an \fIargus-data\fP source, greps the records based on
23 the regexp specified on the command line, and outputs a valid
24 \fIargus-stream\fP.
25
26 Ragrep works only on the fields for user captured data. Argus must be started with the configration option \fBARGUS_CAPTURE_DATA_LEN\fP set to
27 a value greater than 0, to have these data captured. See \fBargus.conf(5)\fP for detail.
28
29 Ragrep is based on GNU \fBgrep(1)\fP, so the \fIregexp\fP syntax is
30 the same as for \fBgrep(1)\fP.
31 .SH OPTIONS
32 Ragrep, like all ra based clients, supports a number of
33 \fBra options\fP including filtering of input argus
34 records through a terminating filter expression.
35 See \fBra(1)\fP for a complete description of \fBra options\fP.
36 \fBragrep(1)\fP specific options are:
37 .PP
38 .PD 0
39 .TP 4 4
40 .B \-c
41 Suppress normal output; instead print a count of
42 matching lines for each input file.
43 With the
44 .BR \-v ", " \-\^\-invert-match
45 option (see below), count non-matching lines.
46
47 .TP 4 4
48 .B \-e <regex>
49 Match regular expression in flow user data fields. Prepend the regex with
50 either "s:" or "d:" to limit the match to either the source or destination
51 user data fields. Examples include:
52 .nf
53 "^SSH-" - Look for ssh connections on any port.
54 "s:^GET" - Look for HTTP GET requests in the source buffer.
55 "d:^HTTP.*Unauth" - Find unauthorized http response.
56
57 .fi
58 .TP
59 .BI \-f " FILE" "\fR
60 Obtain patterns from
61 .IR FILE ,
62 one per line.
63 The empty file contains zero patterns, and therefore matches nothing.
64
65 .TP
66 .BR \-i
67 Ignore case distinctions in both the
68 .I PATTERN
69 and the input files.
70
71 .TP
72 .BR \-L
73 Suppress normal output; instead print the name
74 of each input file from which no output would
75 normally have been printed. The scanning will stop
76 on the first match.
77
78 .TP
79 .BR \-l
80 Suppress normal output; instead print
81 the name of each input file from which output
82 would normally have been printed. The scanning will
83 stop on the first match.
84
85 .TP
86 .BR \-q
87 Quiet; do not write anything to standard output.
88 Exit immediately with zero status if any match is found,
89 even if an error was detected.
90
91 .TP
92 .BR \-R
93 Read all files under each directory, recursively;
94 this is equivalent to the
95 .B "\-d recurse"
96 option.
97
98 .TP
99 .B \-v
100 Reverse the expression matching logic.
101
102 .SH DIAGNOSTICS
103 .PP
104 Normally, exit status is 0 if selected records are found and 1 otherwise.
105 But the exit status is 2 if an error occurred, unless the
106 .B \-q
107 option is used and a selected line is found.
108
109
110 .SH INVOCATION
111 A sample invocation of \fBragrep(1)\fP. This call reads \fBargus(8)\fP data
112 from \fBinputfile\fP and greps all http transactions that generated a "404 Not Found" error.
113
114 .TP 5
115 \fBragrep\fP -r inputfile -e "HTTP.*404"
116
117 .SH SEE ALSO
118 .BR ra(1),
119 .BR rarc(5),
120 .BR argus(8),
121
122 .SH COPYRIGHT
123 Copyright (c) 2000-2024 QoSient. All rights reserved.
124 .SH AUTHORS
125 .nf
126 Carter Bullard ([email protected]).
127 .fi
128 .SH BUGS