You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I'm trying to send logs on remote machine using raw adapter. On my log machine im using ELK (logstash). I have received container name in go template but i cant recevice properly hostname. A "host" field is ip number instead of hostname. I tried receive hostname in go-template with i used in raw_format variable like this:
"RAW_FORMAT={ "container": {{ toJSON .Container.Name }},"message": {{ toJSON .Data }},"hostname": {{ toJSON .Container.Config.Hostname }} }\n" but i receive "localhost"
Hi
I'm trying to send logs on remote machine using raw adapter. On my log machine im using ELK (logstash). I have received container name in go template but i cant recevice properly hostname. A "host" field is ip number instead of hostname. I tried receive hostname in go-template with i used in raw_format variable like this:
here is my docker-compose.yaml file
version: "3"
networks:
logging:
services:
logspout:
image: gliderlabs/logspout:v3.2.12
command: 'raw+tcp://some.addres:5000'
environment:
- DEBUG=1
- "RAW_FORMAT={ "container": {{ toJSON .Container.Name }},"message": {{ toJSON .Data }},"hostname": {{ toJSON .Container.Config.Hostname }} }\n"
volumes:
- /etc/hostname:/etc/hostname
- /etc/hosts:/etc/hosts
- /var/run/docker.sock:/var/run/docker.sock
networks:
- logging
The text was updated successfully, but these errors were encountered: