forked from ViaQ/docker-fluentd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.test
30 lines (27 loc) · 809 Bytes
/
README.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
For really simple, stupid testing, first run the elasticsearch container, then
build the fluentd container. Then:
$ mkdir /var/tmp/log
$ sudo chcon -Rt svirt_sandbox_file_t /var/tmp/log
$ ip addr # find the IP address of docker0 - mine is 172.17.42.1
$ uid=`id -u`
$ id=`docker run -u $uid -e ES_HOST=172.17.42.1 -v /var/tmp/log:/var/log -d bitscout/fluentd:latest`
$ docker logs $id # just to check
$ journalctl -xn > /var/tmp/log/messages
Then you should see stuff show up in elasticsearch:
$ curl http://localhost:9200/_search | python -mjson.tool
{
"_shards": {
"failed": 0,
"successful": 5,
"total": 5
},
"hits": {
"hits": [
...
],
"max_score": 1.0,
"total": 9
},
"timed_out": false,
"took": 1
}