Skip to content

Commit 05cd15e

Browse files
authored
Merge pull request #3 from metacoma/master
Master
2 parents 3cfc9e5 + c9509ad commit 05cd15e

File tree

5 files changed

+67
-1
lines changed

5 files changed

+67
-1
lines changed

files/fluentd/shell.conf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#<source>
2+
# @type named_pipe
3+
# path /tmp/tmux_fluentd.fifo
4+
# tag tmux
5+
# format none
6+
#</source>
7+
8+
<match **>
9+
@type rawtcp
10+
#buffer_type file
11+
#buffer_path /var/log/fluent/logcentral
12+
<buffer>
13+
flush_mode interval
14+
#flush_mode immediate
15+
flush_interval 0.1
16+
</buffer>
17+
<server>
18+
name log1
19+
host 127.0.0.1
20+
port 12345
21+
</server>
22+
</match>

files/fluentd/tmux.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
3+
. ${KAPITAN_COMPILED}/bash/mindwm.sh
4+
5+
NODE_ID="$1"
6+
TMUX_SESSION="Freeplane-Node-${NODE_ID}"
7+
8+
TMUX_LOGFILE="${MINDWM_TMP}/"
9+
10+
test -d mkdir -p
11+
12+
rm ${TMUX_LOGFILE}
13+
mkfifo ${TMUX_LOGFILE}
14+
mkfifo "/tmp/freeplane-${NODE_ID}.fifo"
15+
16+
tmux has-session -t ${TMUX_SESSION} || (
17+
tmux new -s ${TMUX_SESSION} -d 'bash'
18+
#tmux pipe-pane -t ${TMUX_SESSION} "stdbuf -o0 sed -r 's/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?m//g;' > ${TMUX_LOGFILE}"
19+
tmux new-window -t ${TMUX_SESSION}:1 -n shell
20+
tmux send-keys -t ${TMUX_SESSION}:0 "export PS1='\u@\h:\w\$ '" ENTER
21+
tmux send-keys -t ${TMUX_SESSION}:1 "export PS1='\u@\h:\w\$ '" ENTER
22+
# tmux send-keys -t ${TMUX_SESSION}:0 "/home/bebebeko/mindwm/compiled/mindwm//shell/tmux_fifo.groovy ${NODE_ID}" ENTER
23+
tmux pipe-pane -IO -t ${TMUX_SESSION}:1 "cat > ${TMUX_LOGFILE}"
24+
#tmux pipe-pane -I -t ${TMUX_SESSION} "cat > ${TMUX_LOGFILE}-stdout"
25+
sleep 5
26+
)
27+
28+
tmux attach -t ${TMUX_SESSION}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
- pipeline.id: pipeline
1+
- pipeline.id: kubernetes
22
path.config: "/bitnami/logstash/pipeline/kubernetes.conf"
33
#path.config: "/home/bebebeko/mindwm/files/logstash/pipeline/kubernetes.conf"
44
pipeline.ecs_compatibility: disabled
5+
6+
- pipeline.id: shell
7+
path.config: "/bitnami/logstash/pipeline/shell.conf"

files/logstash/pipeline/kubernetes.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ input {
55
codec => json
66
}
77
}
8+
9+
10+
811
filter {
912
if ! [kubernetes][namespace_name] { drop {} }
1013

files/logstash/pipeline/shell.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
input {
2+
tcp {
3+
port => 12345
4+
codec => json
5+
}
6+
}
7+
output {
8+
stdout {
9+
}
10+
}

0 commit comments

Comments
 (0)