@@ -4,24 +4,19 @@ base/frameworks/analyzer/logging.zeek
44=====================================
55.. zeek :namespace :: Analyzer::Logging
66
7- Logging analyzer confirmations and violations into analyzer.log
7+ Logging analyzer violations into analyzer.log
88
99:Namespace: Analyzer::Logging
10- :Imports: :doc: `base/frameworks/analyzer/main.zeek </scripts/base/frameworks/analyzer/main.zeek >`, :doc: `base/frameworks/config < /scripts/base/frameworks/config/index >`, :doc: ` base/frameworks/ logging </scripts/base/frameworks/logging/index >`
10+ :Imports: :doc: `base/frameworks/analyzer/main.zeek </scripts/base/frameworks/analyzer/main.zeek >`, :doc: `base/frameworks/logging </scripts/base/frameworks/logging/index >`
1111
1212Summary
1313~~~~~~~
1414Runtime Options
1515###############
16- =========================================================================================== ==================================================================
17- :zeek:id: `Analyzer::Logging::enable `: :zeek:type: `bool ` :zeek:attr: `&redef ` Enable logging of analyzer violations and optionally confirmations
18- when :zeek:see: `Analyzer::Logging::include_confirmations ` is set.
16+ =========================================================================================== ==============================================================
1917:zeek:id: `Analyzer::Logging::failure_data_max_size `: :zeek:type: `count ` :zeek:attr: `&redef ` If a violation contains information about the data causing it,
2018 include at most this many bytes of it in the log.
21- :zeek:id: `Analyzer::Logging::ignore_analyzers `: :zeek:type: `set ` :zeek:attr: `&redef ` Set of analyzers for which to not log confirmations or violations.
22- :zeek:id: `Analyzer::Logging::include_confirmations `: :zeek:type: `bool ` :zeek:attr: `&redef ` Enable analyzer_confirmation.
23- :zeek:id: `Analyzer::Logging::include_disabling `: :zeek:type: `bool ` :zeek:attr: `&redef ` Enable tracking of analyzers getting disabled.
24- =========================================================================================== ==================================================================
19+ =========================================================================================== ==============================================================
2520
2621Types
2722#####
@@ -37,6 +32,13 @@ Redefinitions
3732 * :zeek:enum: `Analyzer::Logging::LOG `
3833======================================= ===========================================
3934
35+ Events
36+ ######
37+ ============================================================== ===============================================================================
38+ :zeek:id: `Analyzer::Logging::log_analyzer `: :zeek:type: `event ` An event that can be handled to access the :zeek:type: `Analyzer::Logging::Info `
39+ record as it is sent on to the logging framework.
40+ ============================================================== ===============================================================================
41+
4042Hooks
4143#####
4244====================================================================== =============================================
@@ -48,18 +50,8 @@ Detailed Interface
4850~~~~~~~~~~~~~~~~~~
4951Runtime Options
5052###############
51- .. zeek :id :: Analyzer::Logging::enable
52- :source-code: base/frameworks/analyzer/logging.zeek 47 47
53-
54- :Type: :zeek:type: `bool `
55- :Attributes: :zeek:attr: `&redef `
56- :Default: ``T ``
57-
58- Enable logging of analyzer violations and optionally confirmations
59- when :zeek:see: `Analyzer::Logging::include_confirmations ` is set.
60-
6153.. zeek :id :: Analyzer::Logging::failure_data_max_size
62- :source-code: base/frameworks/analyzer/logging.zeek 64 64
54+ :source-code: base/frameworks/analyzer/logging.zeek 37 37
6355
6456 :Type: :zeek:type: `count `
6557 :Attributes: :zeek:attr: `&redef `
@@ -68,57 +60,17 @@ Runtime Options
6860 If a violation contains information about the data causing it,
6961 include at most this many bytes of it in the log.
7062
71- .. zeek :id :: Analyzer::Logging::ignore_analyzers
72- :source-code: base/frameworks/analyzer/logging.zeek 67 67
73-
74- :Type: :zeek:type: `set ` [:zeek:type: `AllAnalyzers::Tag `]
75- :Attributes: :zeek:attr: `&redef `
76- :Default: ``{} ``
77-
78- Set of analyzers for which to not log confirmations or violations.
79-
80- .. zeek :id :: Analyzer::Logging::include_confirmations
81- :source-code: base/frameworks/analyzer/logging.zeek 54 54
82-
83- :Type: :zeek:type: `bool `
84- :Attributes: :zeek:attr: `&redef `
85- :Default: ``F ``
86-
87- Enable analyzer_confirmation. They are usually less interesting
88- outside of development of analyzers or troubleshooting scenarios.
89- Setting this option may also generated multiple log entries per
90- connection, minimally one for each conn.log entry with a populated
91- service field.
92-
93- .. zeek :id :: Analyzer::Logging::include_disabling
94- :source-code: base/frameworks/analyzer/logging.zeek 60 60
95-
96- :Type: :zeek:type: `bool `
97- :Attributes: :zeek:attr: `&redef `
98- :Default: ``F ``
99-
100- Enable tracking of analyzers getting disabled. This is mostly
101- interesting for troubleshooting of analyzers in DPD scenarios.
102- Setting this option may also generated multiple log entries per
103- connection.
104-
10563Types
10664#####
10765.. zeek :type :: Analyzer::Logging::Info
108- :source-code: base/frameworks/analyzer/logging.zeek 18 43
66+ :source-code: base/frameworks/analyzer/logging.zeek 13 33
10967
11068 :Type: :zeek:type: `record `
11169
11270
11371 .. zeek :field :: ts :zeek:type:`time` :zeek:attr:`&log`
11472
115- Timestamp of confirmation or violation.
116-
117-
118- .. zeek :field :: cause :zeek:type:`string` :zeek:attr:`&log`
119-
120- What caused this log entry to be produced. This can
121- currently be "violation" or "confirmation".
73+ Timestamp of the violation.
12274
12375
12476 .. zeek :field :: analyzer_kind :zeek:type:`string` :zeek:attr:`&log`
@@ -148,7 +100,7 @@ Types
148100 Connection identifier if available
149101
150102
151- .. zeek :field :: failure_reason :zeek:type:`string` :zeek:attr:`&log` :zeek:attr:`&optional`
103+ .. zeek :field :: failure_reason :zeek:type:`string` :zeek:attr:`&log`
152104
153105 Failure or violation reason, if available.
154106
@@ -159,12 +111,30 @@ Types
159111 to :zeek:see: `Analyzer::Logging::failure_data_max_size `.
160112
161113
114+ .. zeek :field :: packet_segment :zeek:type:`string` :zeek:attr:`&optional` :zeek:attr:`&log`
115+
116+ (present if :doc: `/scripts/policy/frameworks/analyzer/packet-segment-logging.zeek ` is loaded)
117+
118+ A chunk of the payload that most likely resulted in the
119+ analyzer violation.
120+
121+
162122 The record type defining the columns to log in the analyzer logging stream.
163123
124+ Events
125+ ######
126+ .. zeek :id :: Analyzer::Logging::log_analyzer
127+ :source-code: base/frameworks/analyzer/logging.zeek 41 41
128+
129+ :Type: :zeek:type: `event ` (rec: :zeek:type: `Analyzer::Logging::Info `)
130+
131+ An event that can be handled to access the :zeek:type: `Analyzer::Logging::Info `
132+ record as it is sent on to the logging framework.
133+
164134Hooks
165135#####
166136.. zeek :id :: Analyzer::Logging::log_policy
167- :source-code: base /frameworks/analyzer/logging.zeek 15 15
137+ :source-code: policy /frameworks/analyzer/packet-segment- logging.zeek 38 50
168138
169139 :Type: :zeek:type: `Log::PolicyHook `
170140
0 commit comments