raftman

A syslog server with integrated full text search via a JSON API and Web UI

Github星跟踪图

raftman

raftman

A syslog server with integrated full text search via a JSON API and Web UI.

getting started

store logs

To get started quickly, just run the containerized version of raftman:

sudo docker run --rm --name raftman \
    -v /tmp:/var/lib/raftman \
    -p 514:514/udp \
    -p 5514:5514 \
    -p 8181:8181 \
    -p 8282:8282 \
    pierredavidbelanger/raftman

This will start raftman with all default options. It listen on port 514 (UDP) and 5514 (TCP) on the host for incoming RFC5424 syslog packets and store them into an SQLite database stored in /tmp/logs.db on the host. It also exposes the JSON API on http://localhost:8181/api/ and the Web UI on http://localhost:8282/.

send logs

Time to fill our database. The easyest way is to just start logspout and tell it to point to raftman's syslog port:

docker run --rm --name logspout \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    --link raftman \
    gliderlabs/logspout \
        syslog://raftman:514

This last container will grab other containers output lines and send them as syslog packet to the configured syslog server (ie: our linked raftman container).

generate logs

Now, we also need to generate some output. This will do the job for now:

docker run --rm --name test \
    alpine \
    echo 'Can you see me'

visualise logs

Then we can visualize our logs:

with the raftman API:

curl http://localhost:8181/api/list \
    -d '{"Limit": 100, "Message": "see"}'

or pop the Web UI at http://localhost:8282/

configuration

All raftman configuration options are set as arguments in the command line.

For example, here is the what the command line would looks like if we set all the default values explicitly:

raftman \
    -backend sqlite:///var/lib/raftman/logs.db?insertQueueSize=512&queryQueueSize=16&timeout=5s&batchSize=32&retention=INF \
    -frontend syslog+udp://:514?format=RFC5424&queueSize=512&timeout=0s \
    -frontend syslog+tcp://:5514?format=RFC5424&queueSize=512&timeout=0s \
    -frontend api+http://:8181/api/ \
    -frontend ui+http://:8282/

主要指标

概览
名称与所有者pierredavidbelanger/raftman
主编程语言Go
编程语言Go (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2017-06-08 20:04:04
推送于2023-02-24 19:00:16
最后一次提交2019-11-21 22:40:30
发布数2
最新版本名称1.0.1 (发布于 )
第一版名称1.0.0 (发布于 )
用户参与
星数47
关注者数7
派生数17
提交数9
已启用问题?
问题数1
打开的问题数0
拉请求数0
打开的拉请求数1
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?