logspout icon indicating copy to clipboard operation
logspout copied to clipboard

How to change the app name of the container logs being reflected in logdna

Open surajthakur opened this issue 4 years ago • 0 comments

Hi Team,

I am running logspout to send selected container logs to logdna using the below command. I have got two issues.

Command:

sudo docker run --name="logdna" --restart=always -d -v=/var/run/docker.sock:/var/run/docker.sock -e LOGDNA_KEY="xxxxx" -e TAGS="docker-staging" -e DEBUG="true" -e HOSTNAME="client-1" -e FILTER_LABELS="job:vendor-*,job:user-*" -p 8080:80 logdna/logspout:latest
  1. The logs that are coming in logdna have the app name as container id, which is very difficult to determine which container is it coming from.

Jul 9 08:32:03 client-1 38275aa5429f69554023c8b08a29118c31b4a8089eb01fb52691e6f16a66a9d7 LOG incomplete startup packet Jul 9 08:32:13 client-1 38275aa5429f69554023c8b08a29118c31b4a8089eb01fb52691e6f16a66a9d7 LOG incomplete startup packet Jul 9 08:32:23 client-1 38275aa5429f69554023c8b08a29118c31b4a8089eb01fb52691e6f16a66a9d7 LOG incomplete startup packet image

How could I change app name which is coming as 38275aa5429f69554023c8b08a29118c31b4a8089eb01fb52691e6f16a66a9d7 to the hostname of the respective container or something else?

  1. Another issue is when I add multiple FILTER_LABLELS as I have used in above, it stops sending logs. If I used only one, it works fine. This is the route which it shows

[ { "id": "xxxx", "filter_labels": [ "job:vendor-", "job:user-" ], "adapter": "logdna", "address": "" } ]

Is there anything missing from my side?

Thanks

surajthakur avatar Jul 09 '20 01:07 surajthakur