-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for complex capture group names in parse_regex.
- Loading branch information
1 parent
ce41293
commit 17f52e6
Showing
5 changed files
with
628 additions
and
4 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
95 changes: 95 additions & 0 deletions
95
...ata/valid/linux/logging-processor_parse_regex_rewrite_capture/golden_fluent_bit_main.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,95 @@ | ||
@SET buffers_dir=/var/lib/google-cloud-ops-agent/fluent-bit/buffers | ||
@SET logs_dir=/var/log/google-cloud-ops-agent/subagents | ||
|
||
[SERVICE] | ||
Daemon off | ||
Flush 1 | ||
Log_Level info | ||
dns.resolver legacy | ||
storage.backlog.mem_limit 50M | ||
storage.checksum on | ||
storage.max_chunks_up 128 | ||
storage.metrics on | ||
storage.sync normal | ||
|
||
[INPUT] | ||
Name fluentbit_metrics | ||
Scrape_Interval 60 | ||
Scrape_On_Start True | ||
|
||
[INPUT] | ||
Buffer_Chunk_Size 512k | ||
Buffer_Max_Size 5M | ||
DB ${buffers_dir}/default_pipeline_syslog | ||
Key message | ||
Mem_Buf_Limit 10M | ||
Name tail | ||
Path /var/log/messages,/var/log/syslog | ||
Read_from_Head True | ||
Rotate_Wait 30 | ||
Skip_Long_Lines On | ||
Tag default_pipeline.syslog | ||
storage.type filesystem | ||
|
||
[INPUT] | ||
Buffer_Chunk_Size 512k | ||
Buffer_Max_Size 5M | ||
DB ${buffers_dir}/ops-agent-fluent-bit | ||
Key message | ||
Mem_Buf_Limit 10M | ||
Name tail | ||
Path ${logs_dir}/logging-module.log | ||
Read_from_Head True | ||
Rotate_Wait 30 | ||
Skip_Long_Lines On | ||
Tag ops-agent-fluent-bit | ||
storage.type filesystem | ||
|
||
[FILTER] | ||
Key_Name key_1 | ||
Match default_pipeline.syslog | ||
Name parser | ||
Parser default_pipeline.syslog.0 | ||
|
||
[FILTER] | ||
Match default_pipeline.syslog | ||
Name modify | ||
|
||
|
||
|
||
Rename __1 "logging.googleapis.com/severity" | ||
Rename __2 "z*%\\>\\\\!" | ||
Rename __3 "__6" | ||
|
||
[FILTER] | ||
Add logging.googleapis.com/logName syslog | ||
Match default_pipeline.syslog | ||
Name modify | ||
|
||
[OUTPUT] | ||
Match_Regex ^(default_pipeline\.syslog)$ | ||
Name stackdriver | ||
Retry_Limit 3 | ||
net.connect_timeout_log_error False | ||
resource gce_instance | ||
stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) | ||
tls On | ||
tls.verify Off | ||
workers 8 | ||
|
||
[OUTPUT] | ||
Match_Regex ^(ops-agent-fluent-bit)$ | ||
Name stackdriver | ||
Retry_Limit 3 | ||
net.connect_timeout_log_error False | ||
resource gce_instance | ||
stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) | ||
tls On | ||
tls.verify Off | ||
workers 8 | ||
|
||
[OUTPUT] | ||
Match * | ||
Name prometheus_exporter | ||
host 0.0.0.0 | ||
port 20202 |
6 changes: 6 additions & 0 deletions
6
...a/valid/linux/logging-processor_parse_regex_rewrite_capture/golden_fluent_bit_parser.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,6 @@ | ||
[PARSER] | ||
Format regex | ||
Name default_pipeline.syslog.0 | ||
Regex ^(?P<__1>[EWID]) (?P<__2>.*) (?P<__3>.)$ | ||
Time_Format time_format_1 | ||
Time_Key time_key_1 |
Oops, something went wrong.