Public Repository

Last pushed: a year ago
Short Description
fluentd image base on hypriot/rpi-alpine-scratch
Full Description

Raspbian docker fluentd - armv7

How to run ?

# basic run , foward to log/***.log
sudo docker run -d -p 24224:24224 -v `pwd`/log:/fluentd/log sunnyhu/rpi-alpine-fluentd
# use env replace fluent.conf
sudo docker run -d -p 24224:24224 -e FLUENTD_CONF=df1.conf -v `pwd`/log:/fluentd/log linkerlab/rpi-fluentd
# use local fluent.conf
docker run -d -p 24224:24224 -v `pwd`/etc:/fluentd/etc -v `pwd`/log:/fluentd/log linkerlab/rpi-fluentd

## docker logging forward
**CMD**

-hint : -log-driver=fluentd --log-opt fluentd-address=HOST:PORT

```sh
docker run -d --restart=always \
 --log-driver=fluentd --log-opt fluentd-address=$FLUENT_IP:24224 \
 -v /run/docker.sock:/run/docker.sock \
 -v /usr/bin/docker:/bin/docker \
 -v /root/.docker/config.json:/root/.docker/config.json \
 -v /boot:/boot \
 --net=host \
 git.linkeriot.io:5000/linkeriot/iot-agent-armv7l

Log-driver = syslog
docker run -d -p 24224:24224 \
-e FDN="$(test -e /boot/.lniotlog && echo cat /boot/.lniotlog | grep -oP "(?<=\"logip\":\")[^\"]+" || "0.0.0.0")" \
-e FPORT="$(test -e /boot/.lniotlog && echo cat /boot/.lniotlog | grep -oP "(?<=\"logport\":\")[^\"]+" || "24225")" \
-e TAG="$(test -e /boot/.projectid && echo cat /boot/.projectid | grep -oP "(?<=\"projectid\":\")[^\"]+" || date +%s).$(test -e /boot/.projectid && cat /boot/.deviceid || echo "noduid")" \
-v /var/log:/fluentd/log \
linkerlab/rpi-fluentd

Knowing ISSUE

Need adjust raspbain time

  • Different time cloud cause foward fail

    docker logging will fail when gateway server down

  • Should check fluentd gateway server status

Reference

fluentd-docker-alpine

fluentd-docker-image

google-fluentd

Docker Pull Command
Owner
linkerlab

Comments (0)