Skip to content

Commit

Permalink
fluentbit -> fluentd
Browse files Browse the repository at this point in the history
  • Loading branch information
metacoma committed Dec 15, 2022
1 parent fb9e19a commit c9509ad
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
12 changes: 6 additions & 6 deletions files/fluentd/shell.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<source>
@type named_pipe
path /tmp/tmux_fluentbit.fifo
tag tmux
format none
</source>
#<source>
# @type named_pipe
# path /tmp/tmux_fluentd.fifo
# tag tmux
# format none
#</source>

<match **>
@type rawtcp
Expand Down
28 changes: 28 additions & 0 deletions files/fluentd/tmux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

. ${KAPITAN_COMPILED}/bash/mindwm.sh

NODE_ID="$1"
TMUX_SESSION="Freeplane-Node-${NODE_ID}"

TMUX_LOGFILE="${MINDWM_TMP}/"

test -d mkdir -p

rm ${TMUX_LOGFILE}
mkfifo ${TMUX_LOGFILE}
mkfifo "/tmp/freeplane-${NODE_ID}.fifo"

tmux has-session -t ${TMUX_SESSION} || (
tmux new -s ${TMUX_SESSION} -d 'bash'
#tmux pipe-pane -t ${TMUX_SESSION} "stdbuf -o0 sed -r 's/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?m//g;' > ${TMUX_LOGFILE}"
tmux new-window -t ${TMUX_SESSION}:1 -n shell
tmux send-keys -t ${TMUX_SESSION}:0 "export PS1='\u@\h:\w\$ '" ENTER
tmux send-keys -t ${TMUX_SESSION}:1 "export PS1='\u@\h:\w\$ '" ENTER
# tmux send-keys -t ${TMUX_SESSION}:0 "/home/bebebeko/mindwm/compiled/mindwm//shell/tmux_fifo.groovy ${NODE_ID}" ENTER
tmux pipe-pane -IO -t ${TMUX_SESSION}:1 "cat > ${TMUX_LOGFILE}"
#tmux pipe-pane -I -t ${TMUX_SESSION} "cat > ${TMUX_LOGFILE}-stdout"
sleep 5
)

tmux attach -t ${TMUX_SESSION}

0 comments on commit c9509ad

Please sign in to comment.