generated from 18F/open-source-policy
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP on input filtering using tcp and custom parsers
- Loading branch information
Showing
3 changed files
with
84 additions
and
7 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
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,36 @@ | ||
[MULTILINE_PARSER] | ||
# Combine an HTTP POST into a single message | ||
name combine-http-post | ||
type regex | ||
# | ||
# Regex rules for multiline parsing | ||
# --------------------------------- | ||
# | ||
# configuration hints: | ||
# | ||
# - first state always has the name: start_state | ||
# - every field in the rule must be inside double quotes | ||
# | ||
# rules | state name | regex pattern | next state | ||
# ------|---------------|-------------------------------------------- | ||
rule "start_state" "/^POST \S+ HTTP\/1\.1\r/" "cont" | ||
rule "cont" "/.*/" "cont" | ||
|
||
|
||
[PARSER] | ||
Name cg-http-post-parser | ||
Format regex | ||
# Regex /<\d+>\d+\s(?<time>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+\S+)\s.+\s-\s(?<message>.*)/m | ||
Regex /\<(?<pri>[0-9]{1,5})\>1 (?<time>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+\S+)\s.+\s-\s(?<message>.*)/m | ||
Time_Key time | ||
Time_Format %Y-%m-%dT%H:%M:%S.%L%z | ||
Time_Keep On | ||
|
||
[PARSER] | ||
Name post-with-syslog-rfc5424 | ||
Format regex | ||
# Regex /.*\<(?<pri>[0-9]{1,5})\>1 (?<time>[^ ]+) (?<host>[^ ]+) (?<ident>[^ ]+) (?<pid>[-0-9]+) (?<msgid>[^ ]+) (?<extradata>(\[(.*?)\]|-)) (?<message>.+).*/m | ||
Regex /\<(?<pri>[0-9]{1,5})\>1 (?<time>[^ ]+) (?<host>[^ ]+) (?<ident>[^ ]+) (?<pid>[-a0-9]+) (?<msgid>[^ ]+) (?<extradata>(\[(.*?)\]|-)) (?<message>.*)/m | ||
# Time_Key time | ||
# Time_Format %Y-%m-%dT%H:%M:%S.%L%z | ||
# Time_Keep On |
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,3 +1,3 @@ | ||
#!/bin/sh | ||
|
||
/home/vcap/deps/0/apt/opt/fluent-bit/bin/fluent-bit -P ${PORT} -c fluentbit.conf | ||
/home/vcap/deps/0/apt/opt/fluent-bit/bin/fluent-bit -c fluentbit.conf |