2016-10-29 10:12:00 +02:00
|
|
|
rsyslog
|
|
|
|
=======
|
|
|
|
|
2016-10-29 10:22:21 +02:00
|
|
|
[RSYSLOG][1] is the rocket-fast system for log processing.
|
|
|
|
|
2016-10-29 10:12:00 +02:00
|
|
|
## docker-compose.yml
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
rsyslog:
|
|
|
|
image: vimagick/rsyslog
|
|
|
|
ports:
|
|
|
|
- "514:514/tcp"
|
|
|
|
- "514:514/udp"
|
|
|
|
volumes:
|
2018-07-28 11:34:05 +02:00
|
|
|
- ./rsyslog.conf:/etc/rsyslog.conf
|
2018-07-28 11:01:42 +02:00
|
|
|
- ./data:/var/log
|
2016-10-29 10:12:00 +02:00
|
|
|
restart: always
|
|
|
|
```
|
|
|
|
|
|
|
|
## Up and Running
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ docker-compose up -d
|
2016-10-29 10:22:21 +02:00
|
|
|
|
2016-10-29 10:12:00 +02:00
|
|
|
$ docker-compose exec rsyslog sh
|
2016-10-29 10:22:21 +02:00
|
|
|
>>> pwd
|
|
|
|
/var/log
|
2018-07-28 11:34:05 +02:00
|
|
|
>>> tail -f /var/log/syslog
|
2016-10-29 10:22:21 +02:00
|
|
|
2016-10-29T08:17:34+00:00 172.17.0.1 root: hello
|
|
|
|
2016-10-29T08:17:41+00:00 172.17.0.1 root: world
|
|
|
|
^C
|
|
|
|
>>> exit
|
|
|
|
|
|
|
|
$ logger -n localhost -p mail.debug hello
|
|
|
|
$ logger -n localhost -p mail.info world
|
2016-10-29 10:12:00 +02:00
|
|
|
```
|
2016-10-29 10:22:21 +02:00
|
|
|
|
|
|
|
[1]: http://www.rsyslog.com/
|