Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add basic log filtering for gather-dispatcher and gather-proxy* #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion fly.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
app = "fly-log-shipper-example"
# fly.toml file generated for log-forwarder on 2022-02-15T19:52:09+07:00

app = "log-forwarder"

[env]
ORG = "doyobi"
QUEUE = "log-forwarder"
SUBJECT = "logs.>"

[metrics]
port = 9598
Expand Down
10 changes: 9 additions & 1 deletion vector-configs/vector.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@ data_dir = "/var/lib/vector/"
mode = "unix"
path = "/var/run/vector.sock"

[transforms.log_json]
[transforms.log_remap]
type = "remap"
inputs = ["fly_socket"]
source = '''
. = parse_json!(.message)
'''

[transforms.log_json]
type = "filter"
inputs = ["log_remap"]
condition = '''
app_name = string!(.fly.app.name)
app_name == "gather-dispatcher" || starts_with(app_name, "gather-proxy")
'''

[sinks.fly_log_metrics_prometheus]
type = "prometheus_exporter" # required
inputs = ["fly_log_metrics"] # required
Expand Down