``ethernet`` value will be populated with mac addresses from the flow's first
packet with ethernet header.
+If ``suricata-version`` is set to yes, then Suricata version, with its git
+revision if available, will be added to events as ``suricata_version``.
+
Output Buffering
~~~~~~~~~~~~~~~~
#level: Info ## possible levels: Emergency, Alert, Critical,
## Error, Warning, Notice, Info, Debug
#ethernet: no # log ethernet header in events when available
+ #suricata-version: no # include suricata version. Default no.
#redis:
# server: 127.0.0.1
# port: 6379
void EveAddCommonOptions(const OutputJsonCommonSettings *cfg, const Packet *p, const Flow *f,
SCJsonBuilder *js, enum SCOutputJsonLogDirection dir)
{
+ if (cfg->include_suricata_version) {
+ SCJbSetString(js, "suricata_version", PROG_VER);
+ }
if (cfg->include_metadata) {
EveAddMetadata(p, f, js);
}
json_ctx->cfg.include_ethernet = false;
}
+ const SCConfNode *suriver = SCConfNodeLookupChild(conf, "suricata-version");
+ if (suriver && suriver->val && SCConfValIsTrue(suriver->val)) {
+ SCLogConfig("Enabling Suricata version logging.");
+ json_ctx->cfg.include_suricata_version = true;
+ } else {
+ json_ctx->cfg.include_suricata_version = false;
+ }
+
/* See if we want to enable the community id */
const SCConfNode *community_id = SCConfNodeLookupChild(conf, "community-id");
if (community_id && community_id->val && SCConfValIsTrue(community_id->val)) {
bool include_metadata;
bool include_community_id;
bool include_ethernet;
+ bool include_suricata_version;
uint16_t community_id_seed;
} OutputJsonCommonSettings;
# Include top level metadata. Default yes.
#metadata: no
+ # Include suricata version. Default no.
+ #suricata-version: yes
# include the name of the input pcap file in pcap file processing mode
pcap-file: false