-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix Barracuda WAF app_parser (#2115)
* fix: Fix app-syslog-barracuda_waf.conf * docs: Update documentation after fixing parser for Barracuda WAF * docs: Update documentation after fixing parser for Barracuda WAF * chore: update test samples, product name and filter for Barracuda WAF * fix: exclude prefix flag due to failing tests * fix: remove flags ignore-case due to failing tests
- Loading branch information
1 parent
cc272b8
commit 04e531a
Showing
4 changed files
with
127 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
# WAF (On Premises) | ||
# Barracuda WAF (On Premises) | ||
|
||
## Key facts | ||
|
||
* RFC 3164 Framed | ||
* Default port 514 | ||
* RFC 5424 Framed with non-standard ISO timestamp: `%Y-%m-%d %H:%M:%S.%f %z` | ||
* MSG Format based filter | ||
|
||
|
||
## Links | ||
|
||
| Ref | Link | | ||
|----------------|---------------------------------------------------------------------------------------------------------| | ||
| Splunk Add-on | None | | ||
| Product Manual | None | | ||
| Splunk Add-on | https://splunkbase.splunk.com/app/3776 | | ||
| Product Manual | https://campus.barracuda.com/product/webapplicationfirewall/doc/92767349/exporting-log-formats/ | | ||
|
||
## Sourcetypes | ||
|
||
| sourcetype | notes | | ||
|-----------------|---------------------------------------------------------------------------------------------------------| | ||
|barracuda:waf | none | | ||
|barracuda:system | program("SYS") | | ||
|barracuda:waf | program("WF") | | ||
|barracuda:web | program("TR") | | ||
|barracuda:audit | program("AUDIT") | | ||
|barracuda:firewall | program("NF") | | ||
|
||
## Sourcetype and Index Configuration | ||
|
||
| key | sourcetype | index | notes | | ||
|--------|----------------|--------|----------------| | ||
| barracuda_system | barracuda:system | netwaf | None | | ||
| barracuda_waf | barracuda:waf | netwaf | None | | ||
| barracuda_web | barracuda:web | netwaf | None | | ||
| barracuda_audit | barracuda:audit | netwaf | None | | ||
| barracuda_firewall | barracuda:firewall | netwaf | None | |
22 changes: 22 additions & 0 deletions
22
package/etc/conf.d/conflib/almost-syslog/app-almost-syslog-barracuda_waf.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
block parser app-almost-syslog-barracuda_waf() { | ||
channel { | ||
parser { | ||
regexp-parser( | ||
prefix(".tmp.") | ||
patterns('^(?<pri>\<\d+\>)(?: *)(?<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} (\+|-)\d{4})\s{1,2}(?<host>[^ ]+) (?<log_type>(SYS|WF|TR|AUDIT|NF)) (?<message>.*)') | ||
); | ||
date-parser( | ||
format('%Y-%m-%d %H:%M:%S.%f %z') | ||
template("${.tmp.timestamp}") | ||
); | ||
syslog-parser( | ||
flags(assume-utf8, guess-timezone) | ||
template("${.tmp.pri} $S_ISODATE ${.tmp.host} ${.tmp.log_type} ${.tmp.message}") | ||
); | ||
}; | ||
}; | ||
}; | ||
|
||
application app-almost-syslog-barracuda_waf[sc4s-almost-syslog] { | ||
parser { app-almost-syslog-barracuda_waf(); }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters