sudo cscli collections install ZoeyVid/npmplusInstalls 5 parsers and 54 scenarios.
View NPMplus →sudo cscli parsers install crowdsecurity/syslog-logsThen reload CrowdSec: sudo systemctl reload crowdsec
Sign in to see which of your engines run it →Hover a line or a note to see what each field does.
#If it's syslog, we are going to extract progname from itfilter: "evt.Line.Labels.type == 'syslog'"onsuccess: next_stagepattern_syntax:RAW_SYSLOG_PREFIX: '^<%{NUMBER:syslog_priority}>%{NUMBER:syslog_version} %{SYSLOGBASE2} %{DATA:program} (?:%{NUMBER:pid}|-)'RAW_SYSLOG_META: '\[meta sequenceId="%{NOTDQUOTE:seq_id}"\]'name: crowdsecurity/syslog-logsnodes:- grok:# BusyBox syslogd places facility.severity after the hostname.pattern: '^%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:logsource} %{WORD:facility}\.%{WORD:severity} %{SYSLOGPROG}: %{GREEDYDATA:message}$'apply_on: Line.Raw- grok:#this is a named regular expression. grok patterns can be kept into separate files for readabilitypattern: "^%{SYSLOGLINE}"#This is the field of the `Event` to which the regexp should be appliedapply_on: Line.Raw- grok:#RFC5424 syslog format (used by pfSense and OPNsense with alternative logging)pattern: '%{RAW_SYSLOG_PREFIX} - (?:%{RAW_SYSLOG_META} |- )%{GREEDYDATA:message}'apply_on: Line.Raw#if the node was successfull, statics will be applied.statics:- meta: machineexpression: evt.Parsed.logsource- parsed: "logsource"value: "syslog"# syslog date can be in two different fields (one of hte assignment will fail)- target: evt.StrTimeexpression: evt.Parsed.timestamp- target: evt.StrTimeexpression: evt.Parsed.timestamp8601- meta: datasource_pathexpression: evt.Line.Src- meta: datasource_typeexpression: evt.Line.Module---#if it's not syslog, the type is the prognamefilter: "evt.Line.Labels.type not in ['syslog', 'unifi']"onsuccess: next_stage
Sign in to see the Security Engines that run this log parser, the version they run and whether it was modified locally.
This is a generic linux syslog parser with time-support.
It also supports BusyBox syslogd's facility.severity field after the hostname,
as used by Alpine Linux. Use a file acquisition with the type: syslog label
(e.g. /var/log/messages) for these logs.
Add datasource_type and datasource_path source and datasource type in the Meta object.