logspout icon indicating copy to clipboard operation
logspout copied to clipboard

dockers logfiles to sort out after sending to remote syslog server UDP:514

Open itkroplis opened this issue 7 years ago • 0 comments

Hi!

I have a docker server for train, and Docker + Kubernetes cluster for PROD. i need send logs from dockers. I try logspout. I use:

docker run --name logspout -d --volume=/var/run/docker.sock:/var/run/docker.sock
-e SYSLOG_STRUCTURED_DATA="<Loggly API Key>@41058 tag="some tag name""
gliderlabs/logspout
syslog+udp://10.1.0.7:514

It work! Remote syslog server get logs. 2018-04-23T09:05:01Z 574ffad24091 urdas-pricing 28503 - [<Loggly API Key>@41058 tag="some tag name"] 2018-04-23 09:05:01.030 INFO 1 --- [TaskScheduler-6] l.i.u.p.domain.payment.PaymentScheduler : Check payment statuses

But I have more dockers, and there are problems with looks.

Or is possible change LOG line as follows:

DockerContainerName 2018-04-23T09:05:01Z 574ffad24091 urdas-pricing 28503 - [<Loggly API Key>@41058 tag="some tag name"] 2018-04-23 09:05:01.030 INFO 1 --- [TaskScheduler-6] l.i.u.p.domain.payment.PaymentScheduler : Check payment statuses

i use the CACTI syslog and first word until space = All Programs tab. Currently I see "1"

itkroplis avatar Apr 23 '18 10:04 itkroplis