Skip to content

Commit

Permalink
tmux -> fluentd -> logstash
Browse files Browse the repository at this point in the history
  • Loading branch information
metacoma committed Dec 15, 2022
1 parent 5596804 commit fb9e19a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
22 changes: 22 additions & 0 deletions files/fluentd/shell.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<source>
@type named_pipe
path /tmp/tmux_fluentbit.fifo
tag tmux
format none
</source>

<match **>
@type rawtcp
#buffer_type file
#buffer_path /var/log/fluent/logcentral
<buffer>
flush_mode interval
#flush_mode immediate
flush_interval 0.1
</buffer>
<server>
name log1
host 127.0.0.1
port 12345
</server>
</match>
5 changes: 4 additions & 1 deletion files/logstash/config/pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- pipeline.id: pipeline
- pipeline.id: kubernetes
path.config: "/bitnami/logstash/pipeline/kubernetes.conf"
#path.config: "/home/bebebeko/mindwm/files/logstash/pipeline/kubernetes.conf"
pipeline.ecs_compatibility: disabled

- pipeline.id: shell
path.config: "/bitnami/logstash/pipeline/shell.conf"
3 changes: 3 additions & 0 deletions files/logstash/pipeline/kubernetes.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ input {
codec => json
}
}



filter {
if ! [kubernetes][namespace_name] { drop {} }

Expand Down
10 changes: 10 additions & 0 deletions files/logstash/pipeline/shell.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
input {
tcp {
port => 12345
codec => json
}
}
output {
stdout {
}
}

0 comments on commit fb9e19a

Please sign in to comment.