Skip to content

Commit

Permalink
Make Container the Host in Papertrail to prevent Systems Spam
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo authored Oct 1, 2020
1 parent 513d264 commit 45c9010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logshipper/papertrail.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func CreatePapertrailShipper(ctx context.Context, paperTrailProtocol, paperTrail
func (l *PapertrailShipper) Log(ev kail.Event) error {
if l.papertrailShipperInst != nil && ev != nil && len(ev.Log()) > 0 {
payload := &papertrailgo.Payload{
Hostname: ev.Source().Name(),
Tag: fmt.Sprintf("node(%s)/namespace(%s)/container(%s)", ev.Source().Node(), ev.Source().Namespace(), ev.Source().Container()),
Hostname: fmt.Sprintf("%s/%s", ev.Source().Namespace(), ev.Source().Container()),
Tag: fmt.Sprintf("rkubelog/node(%s)/pod(%s)", ev.Source().Node(), ev.Source().Name()),
Log: string(ev.Log()),
}
return l.papertrailShipperInst.Log(payload)
Expand Down

0 comments on commit 45c9010

Please sign in to comment.