Skip to content

specialization of the logspout container modified to set the hostname including the instance ID on ECS

License

Notifications You must be signed in to change notification settings

Signiant/logspout-ecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logspout-ecs

specialization of the logspout container modified to set the hostname including the instance ID on ECS

This small tweak runs a small shell script before invoking logspout to get the instance ID from the EC2 metatdata. It then appends that to whatever is passed in as the SYSLOG_HOSTNAME environment variable to use the final value as the syslog hostname. If not SYSLOG_HOSTNAME variable is present, the syslog hostname is just set to the hostname as per default logspout behaviour.

This is useful when running on AWS ECS and sending logs to papertrail because you can then see which ECS cluster node your container is running on.

Ensure you pass in SYSLOG_HOSTNAME as an environment variable.

About

specialization of the logspout container modified to set the hostname including the instance ID on ECS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •