| 1 |
filter: "evt.Line.Labels.type == 'unifi'" |
| 2 |
onsuccess: next_stage |
| 3 |
pattern_syntax: |
| 4 |
SYSLOGBASE_UNIFI: '(?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601}) (?:%{SYSLOGFACILITY} )?%{DATA:logsource}+(?: %{SYSLOGPROG}:|)' |
| 5 |
SYSLOGLINE_UNIFI: '%{SYSLOGBASE_UNIFI} %{GREEDYDATA:message}' |
| 6 |
name: crowdsecurity/unifi-logs |
| 7 |
nodes: |
| 8 |
- grok: |
| 9 |
pattern: "^%{SYSLOGLINE_UNIFI}" |
| 10 |
apply_on: Line.Raw |
| 11 |
statics: |
| 12 |
- meta: machine |
| 13 |
expression: evt.Parsed.logsource |
| 14 |
- parsed: "logsource" |
| 15 |
value: "syslog" |
| 16 |
- target: evt.StrTime |
| 17 |
expression: evt.Parsed.timestamp |
| 18 |
- target: evt.StrTime |
| 19 |
expression: evt.Parsed.timestamp8601 |
| 20 |
- meta: datasource_path |
| 21 |
expression: evt.Line.Src |
| 22 |
- meta: datasource_type |
| 23 |
expression: evt.Line.Module |