logdna / logdna/logspout

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

Open
#23 0 comments 0 reactions 1 assignee Claimed by @smusali View on GitHub
Dominant language
Go
Stars
16
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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](https://user-images.githubusercontent.com/6575053/86987506-8d3ef980-c1d9-11ea-9ec1-aa75ec0af369.png)

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

2) 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.