What I'm trying to achieve is to redirect python print from one docker 
container to the other (without any modification inside python code), with 
graylog2 (I'm currently using older version, all in one). 

So my first docker instance contains graylog server. I created second 
instance with Dockerfile, using Ubuntu and included simple script that 
prints current time:


from datetime import datetime
import time

date = datetime.now()
print(str(date.day) + '/' + str(date.month) + '/' + str(date.year))
while True:
   date = datetime.now()
   print(str(date.hour) + ':' + str(date.minute) + ':' + str(date.second))
   time.sleep(1)


I'm using command below to start graylog


docker run -t -p 9000:9000 -p 12201:12201 graylog2/allinone 

and to start second container and run my script:

docker run --log-driver=gelf --log-opt gelf-address=udp://0.0.0.0:12201 
test python -i ../test.py


I'm trying to send my logs to GELF UDP, not sure if it's the right way, 
because there are no logs whatsoever, no matter which address/port I 
choose. For now I can't even log simple echo from bash, but I'm not sure 
where's the problem itself.

My 'input' overview:

<https://lh3.googleusercontent.com/-KHc4FgHlXFQ/V7DIPp7SGLI/AAAAAAAACOY/qeUtLi-38AkDQkJj1sewoyDB6skE7fGMQCLcB/s1600/Bez%25C2%25A0tytu%25C5%2582u.png>


-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/519591b2-2281-4353-8d5f-68cdf36e7a3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to