From: Jeff Lucovsky Date: Tue, 30 Apr 2024 17:11:50 +0000 (-0400) Subject: doc: Document reference config setting X-Git-Tag: suricata-8.0.0-beta1~882 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8064847fc61a473fa56605cc9f5ff8a6c15fc41b;p=thirdparty%2Fsuricata.git doc: Document reference config setting Issue: 4974 --- diff --git a/doc/userguide/output/eve/eve-json-output.rst b/doc/userguide/output/eve/eve-json-output.rst index 4e0694cdb5..c9c1d63e02 100644 --- a/doc/userguide/output/eve/eve-json-output.rst +++ b/doc/userguide/output/eve/eve-json-output.rst @@ -89,6 +89,9 @@ Metadata:: # Log the raw rule text. #raw: false + # Include the rule reference information + #reference: false + Anomaly ~~~~~~~ diff --git a/doc/userguide/partials/eve-log.yaml b/doc/userguide/partials/eve-log.yaml index a96bc90e8a..68a4b67064 100644 --- a/doc/userguide/partials/eve-log.yaml +++ b/doc/userguide/partials/eve-log.yaml @@ -75,6 +75,19 @@ outputs: # payload-length: yes # enable dumping payload length, including the gaps # packet: yes # enable dumping of packet (without stream segments) # metadata: no # enable inclusion of app layer metadata with alert. Default yes + # If you want metadata, use: + # metadata: + # Include the decoded application layer (ie. http, dns) + #app-layer: true + # Log the current state of the flow record. + #flow: true + #rule: + # Log the metadata field from the rule in a structured + # format. + #metadata: true + # Log the raw rule text. + #raw: false + #reference: false # include reference information from the rule # http-body: yes # Requires metadata; enable dumping of HTTP body in Base64 # http-body-printable: yes # Requires metadata; enable dumping of HTTP body in printable format # websocket-payload: yes # Requires metadata; enable dumping of WebSocket Payload in Base64 diff --git a/src/output-json-alert.c b/src/output-json-alert.c index f2e4064140..11563e28a9 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -244,11 +244,11 @@ void AlertJsonHeader(void *ctx, const Packet *p, const PacketAlert *pa, JsonBuil AlertJsonSourceTarget(p, pa, js, addr); } - if ((json_output_ctx != NULL) && (flags & LOG_JSON_REFERENCE)) { + if ((flags & LOG_JSON_REFERENCE)) { AlertJsonReference(pa, js); } - if ((json_output_ctx != NULL) && (flags & LOG_JSON_RULE_METADATA)) { + if (flags & LOG_JSON_RULE_METADATA) { AlertJsonMetadata(json_output_ctx, pa, js); }