Skip to content

3.2.0

Compare
Choose a tag to compare
@irvingpop irvingpop released this 29 Jan 23:01
26d63b2

This versions adds not one but TWO centralized log capture mechanisms!

  1. Cloudwatch Logs for all system and chef server logs. Storing data in AWS which is useful for audit and troubleshooting cluster launch issues without sshing all over the place
  2. Filebeat for shipping all system and chef server logs into the built-in Elasticsearch instance, useful for visualizing traffic in Kibana.

Using it (command-line)

Cloudwatch logs

get the awslogs utility and then you can do things like this:

$ awslogs groups
mychefstack-VarLogAwsSigningProxyLog-1QVRV8DF5NBCW
mychefstack-VarLogCfnInitCmdLog-1N95V3M26B95V
mychefstack-VarLogCfnInitLog-1W4PHEJA5VOYW
...

$ awslogs get mychefstack-VarLogOpscodeOpscodeErchefRequestsLog-1G8GNRNLG01QU ALL --watch
irving-backendless-chef2-VarLogOpscodeOpscodeErchefRequestsLog-1G8GNRNLG01QU i-07147cb1ec58da84f 2018-01-24T00:35:25Z [email protected] method=GET; path=/_status; status=200;
irving-backendless-chef2-VarLogOpscodeOpscodeErchefRequestsLog-1G8GNRNLG01QU i-0ae3d3c56ec9b1071 2018-01-24T00:35:25Z [email protected] method=GET; path=/_status; status=200;
irving-backendless-chef2-VarLogOpscodeOpscodeErchefRequestsLog-1G8GNRNLG01QU i-0ae3d3c56ec9b1071 2018-01-24T00:35:25Z [email protected] method=GET; path=/_status; status=200;
irving-backendless-chef2-VarLogOpscodeOpscodeErchefRequestsLog-1G8GNRNLG01QU i-07147cb1ec58da84f 2018-01-24T00:36:01Z [email protected] method=GET; path=/_status; status=200;
irving-backendless-chef2-VarLogOpscodeOpscodeErchefRequestsLog-1G8GNRNLG01QU i-0ae3d3c56ec9b1071 2018-01-24T00:36:01Z [email protected] method=GET; path=/_status; status=200;

Filebeat/Kibana

To access the VPC-integrated Kibana instance that's built-in to your AWS ES service, ssh to the instance with port forwarding like so:

 ssh -L 9200:localhost:9200 -l ec2-user my-ec2-instance

Then open a web browser and navigate to http://localhost:9200/_plugin/kibana/

What it looks like:

Filebeat/Kibana

screen shot 2018-01-23 at 11 05 47 am

Cloudwatch logs:

screen shot 2018-01-23 at 11 07 05 am

screen shot 2018-01-23 at 11 07 47 am

screen shot 2018-01-23 at 11 08 28 am