Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance cloudwatch log capturing to include entire output of systemd logs #40

Open
obscurerichard opened this issue Jul 30, 2019 · 0 comments

Comments

@obscurerichard
Copy link
Member

obscurerichard commented Jul 30, 2019

I want everything that journalctl -f emits, in a systemd log group, for example:

Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:17:48 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3641|app: 0|req: 31/127] 10.0.1.127 () {38 vars in 444 bytes} [Tue Jul 30 16:17:48 2019] GET /api/spin => generated 150 bytes in 70 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:17:49 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3685|app: 0|req: 86/128] 10.0.2.111 () {38 vars in 444 bytes} [Tue Jul 30 16:17:48 2019] GET /api/spin => generated 149 bytes in 808 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:18:00 ip-10-0-1-81.ec2.internal sudo[6351]:   centos : TTY=pts/0 ; PWD=/home/centos ; USER=root ; COMMAND=/bin/journalctl -f
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3685|app: 0|req: 87/129] 10.0.3.114 () {38 vars in 444 bytes} [Tue Jul 30 16:18:18 2019] GET /api/spin => generated 149 bytes in 74 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: ImportError: Import by filename is not supported.
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: unable to load app 1 (mountpoint='/api') (callable not found or import error)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3669|app: 0|req: 1/130] 10.0.1.127 () {38 vars in 444 bytes} [Tue Jul 30 16:18:18 2019] GET /api/spin => generated 151 bytes in 99 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: announcing my loyalty to the Emperor...
Jul 30 16:18:18 ip-10-0-1-81.ec2.internal uwsgi[3620]: Tue Jul 30 16:18:18 2019 - [emperor] vassal infra-demo.ini is now loyal
Jul 30 16:18:19 ip-10-0-1-81.ec2.internal uwsgi[3620]: [pid: 3685|app: 0|req: 88/131] 10.0.2.111 () {38 vars in 444 bytes} [Tue Jul 30 16:18:18 2019] GET /api/spin => generated 149 bytes in 618 msecs (HTTP/1.1 200) 2 headers in 66 bytes (1 switches on core 0)

Once we get this working we should examine the data captured in the other log groups to see if there are redundant logs we can remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant