1
00:00:00,450 --> 00:00:01,680
A lot don't come back.

2
00:00:01,710 --> 00:00:07,470
Let's talk about monitoring and logging in elastics beanstalk and the patterns and type patterns for

3
00:00:07,510 --> 00:00:10,430
elastic beanstalk elastic beanstalk and cloud watch.

4
00:00:10,440 --> 00:00:15,600
So that's being stopped automatically we use Amazon Cloud watch to help you monitor your application

5
00:00:15,630 --> 00:00:16,530
and environments.

6
00:00:16,530 --> 00:00:21,300
So basically what are saying is being beanstalk is integrated with cloud which you can define custom

7
00:00:21,300 --> 00:00:22,010
metrics.

8
00:00:22,020 --> 00:00:27,330
Also not only the standard ones for your own use an elastic beanstalk will push those metrics to Amazon

9
00:00:27,360 --> 00:00:32,510
Cloud watch once you define the metrics you can view them in the Amazon cloud watch console.

10
00:00:32,580 --> 00:00:37,980
You can also leverage Amazon cloud or alarms to help you implement decisions more easily by enabling

11
00:00:37,980 --> 00:00:43,080
you to send notification automatically make changes like the alarms in cloud which I don't need to elaborate

12
00:00:43,080 --> 00:00:49,740
on that but it helps you take actions based on specific events that could happen within your environment.

13
00:00:49,750 --> 00:00:56,970
Last week when stock and cloud watch logs with cloud watch logs you can monitor and archive in cloud

14
00:00:56,970 --> 00:01:01,650
watch logs itself which saves it indefinitely unless you're configured to do otherwise or it can even

15
00:01:01,920 --> 00:01:09,150
send them to as three an archive your Lusignan took applications system custom log files from an easy

16
00:01:09,150 --> 00:01:11,160
to instances of you environment.

17
00:01:11,160 --> 00:01:17,250
You can also configure alarms that make it easier for you to react to a specific log stream events that

18
00:01:17,260 --> 00:01:18,750
your metric filters extract.

19
00:01:18,750 --> 00:01:23,910
So basically the cloud watch logs are going to send the logs from the servers from being stuck to a

20
00:01:23,910 --> 00:01:25,580
specific log group.

21
00:01:25,620 --> 00:01:31,610
And in that log group you can apply filters and based on the filters you can make alarms and based on

22
00:01:31,620 --> 00:01:37,500
alarms you do actions or react to certain events which logs always been unable to do what you love no

23
00:01:37,500 --> 00:01:44,250
matter what is going to install a log agent when it each instance in your environment which publishes

24
00:01:44,250 --> 00:01:50,280
so that logs agent is what publishes the meta data points or the custom metrics to cloud service for

25
00:01:50,310 --> 00:01:57,090
each log group you configure each log group from the cloud that your group applies its own filter patterns

26
00:01:57,090 --> 00:02:04,140
to determine what logs team events to send to cloud watch as data points or as metrics as values for

27
00:02:04,200 --> 00:02:10,080
metrics and these logs teams that belong to the same group will share the same retention monitoring

28
00:02:10,140 --> 00:02:12,090
and access control settings.

29
00:02:12,120 --> 00:02:18,630
You can configure elastic beanstalk to automatically stream logs to the cloud watch service in addition

30
00:02:18,630 --> 00:02:24,660
to instant logs What else can I monitor with the watch logs if you enable Enhanced Health.

31
00:02:24,660 --> 00:02:28,620
So this is a differentiator for lastic beanstalk that works.

32
00:02:28,950 --> 00:02:35,130
Enhanced Health for our environment so it looks at the web server logs it looks at the code logs it

33
00:02:35,130 --> 00:02:38,750
looks at the application errors if you want certain errors.

34
00:02:38,760 --> 00:02:41,390
All that can be monitored by cloud watch logs.

35
00:02:41,550 --> 00:02:46,050
You can configure that environment to stream health information to cloud watch log so its not only that

36
00:02:46,050 --> 00:02:52,050
easy to instances but everything thats why we are saying when it comes to application the best is buying

37
00:02:52,050 --> 00:02:55,060
stock from a visibility monitoring and automation perspective.

38
00:02:55,080 --> 00:03:02,850
Things in the middle and cloud formation is the fire and the last one to provide detailed health information

39
00:03:02,850 --> 00:03:05,550
about easy to instances running in your environment.

40
00:03:05,550 --> 00:03:07,980
Elastic Winstock includes a health agent.

41
00:03:08,040 --> 00:03:14,070
Now we have a cloud watch an agent and a health agent in the am right for each platform configuration

42
00:03:14,070 --> 00:03:15,700
that supports Enhanced Health.

43
00:03:15,710 --> 00:03:20,760
Remember when we were talking about the custom platforms and I told you that the lies that Winstock

44
00:03:20,760 --> 00:03:26,640
has built for each different platform for each different programming language already have some customization.

45
00:03:26,640 --> 00:03:27,970
Part of that is the health.

46
00:03:27,990 --> 00:03:34,140
So if you are to customize one of the being stuck in mice to build a custom EMI with other softwares

47
00:03:34,170 --> 00:03:40,920
that you need make sure that you are maintaining what it has done in them for health monitoring to maintain

48
00:03:41,040 --> 00:03:46,050
that ability or that capability the health agent monitors with server blocks.

49
00:03:46,050 --> 00:03:50,920
So we're looking now at the web server logs system metrics and relate them to elastic beanstalks service

50
00:03:51,000 --> 00:03:56,310
elastic beanstalk will analyze the metrics along with data from elastic load balancing from an easy

51
00:03:56,310 --> 00:04:00,090
to of scaling and provide an overall picture of the environment health.

52
00:04:00,090 --> 00:04:05,310
So now if you see that what you're seeing ministroke is doing is looking at the software logs elastic

53
00:04:05,370 --> 00:04:06,180
load balancer.

54
00:04:06,260 --> 00:04:10,460
Look it's looking at all the scaling is it for instance is looking at all of that and analyzing that

55
00:04:10,800 --> 00:04:16,290
and it provides on the concert on the dashboard you can see that your application is green OK with a

56
00:04:16,300 --> 00:04:22,380
checkmark So you are good and it can provide different colors based on the health of your environment

57
00:04:22,500 --> 00:04:25,890
based on the analysis that it has done on your behalf.

58
00:04:25,890 --> 00:04:30,960
Now let's look at exporting logs to S-3 from cloud watch logs.

59
00:04:30,960 --> 00:04:38,310
You can export log data that has been sent from beanstalk to cloud watch logs to an Amazon S3 bucket

60
00:04:38,400 --> 00:04:45,350
and use this data in a custom processing analysis or to load it into other systems if in a scenario

61
00:04:45,350 --> 00:04:52,230
in the exam part of plastic bins stock options where that you retain the logs to an S3 bucket that can

62
00:04:52,230 --> 00:04:56,910
happen if you are told that it's going to be sent to clog watch logs and cloud watch will be configured

63
00:04:56,910 --> 00:04:58,980
to send that to an S3 bucket of your choice.

64
00:04:58,980 --> 00:05:00,570
That is also possible.

65
00:05:00,720 --> 00:05:01,280
OK.

66
00:05:01,420 --> 00:05:05,340
But in AABs works do you have the option to send the logs directly to a street.

67
00:05:05,340 --> 00:05:05,790
No.

68
00:05:05,830 --> 00:05:11,260
You have to send it to club watch logs and configure clock watch looks to archive it to s three to begin

69
00:05:11,260 --> 00:05:12,340
the export process.

70
00:05:12,340 --> 00:05:15,830
You must create an three bucket to store the exported log data.

71
00:05:15,850 --> 00:05:19,060
So it's not the same bucket that elastic Winstock would create.

72
00:05:19,060 --> 00:05:20,090
It's a different one.

73
00:05:20,110 --> 00:05:25,270
In this case because we're talking about cloud watch logs sending to three.

74
00:05:25,540 --> 00:05:32,140
You can store the exported files in your Amazon S3 bucket and define Amazon as the lifecycle to archive

75
00:05:32,140 --> 00:05:38,650
that to Glacier automatically and you can export the logs from multiple groups or multiple time ranges

76
00:05:38,880 --> 00:05:41,170
to the same as three bucket.

77
00:05:41,230 --> 00:05:43,970
And if you want to separate the log data for each task.

78
00:05:44,020 --> 00:05:51,070
This is more of this ops but you can have a Prefect's to each group and that Prefect's will allow you

79
00:05:51,070 --> 00:05:55,180
to differentiate the logs in the common S-3 bucket.

80
00:05:55,180 --> 00:05:58,590
Now let's look at logging where the docker platform configurations.

81
00:05:58,600 --> 00:06:06,880
Can I do similar if I have used elastic beanstalk to deploy my application on a dock or container platform

82
00:06:06,970 --> 00:06:08,030
looking with docker.

83
00:06:08,260 --> 00:06:13,440
So specify that directory inside the container to which your application writes locks.

84
00:06:13,450 --> 00:06:19,750
So now in your application you are instructed to apply the logs to a specific folder and then you can

85
00:06:19,990 --> 00:06:26,500
configure the doctor to send the slug's or a certain logging folder that will be rotated saved locally

86
00:06:26,500 --> 00:06:32,890
archived locally and then rotated or sent to the cloud trail elastic beanstalk is integrated with cloud

87
00:06:32,890 --> 00:06:38,420
trail and it will send all the AP eyes as the other services are all you need to do is you need to configure

88
00:06:38,440 --> 00:06:44,420
a trail and then all the logs of the API calls is going to be coming into your trail.

89
00:06:44,530 --> 00:06:49,030
OK let's hop through the patterns and anti-protons and I promise you this is going to be the last thing

90
00:06:49,060 --> 00:06:54,190
because I know elastic beanstalk we probably have spent a lot of time on it but it is worth it because

91
00:06:54,850 --> 00:06:59,680
they use dark or they use logging and all that in a scenario and you are completely lost especially

92
00:07:00,010 --> 00:07:06,870
with that gray area between Officeworks beanstalk and cloud formation that I hope we have already clarified

93
00:07:06,870 --> 00:07:12,970
now and there is no ambiguity about the fine line differences between the different services.

94
00:07:13,100 --> 00:07:18,070
So patterns when we use plastic bins or when we had advised advisement to use block mid-stroke if you

95
00:07:18,070 --> 00:07:20,970
want to quickly deploy an application prototype for testing.

96
00:07:21,160 --> 00:07:26,070
I don't know anything about it and I don't know anything about it as then just know enough about the

97
00:07:26,130 --> 00:07:31,330
Winstock deployer application no or minimal knowledge about it its infrastructure when deploying an

98
00:07:31,330 --> 00:07:32,260
application to it.

99
00:07:32,270 --> 00:07:34,090
Yes that's a good use case.

100
00:07:34,330 --> 00:07:39,730
Migrating with applications that are running on custom application servers on premise to it.

101
00:07:39,800 --> 00:07:40,260
Yes.

102
00:07:40,270 --> 00:07:45,580
So what do I need to do if I'm going to use Dharker you create a file include all its components and

103
00:07:45,580 --> 00:07:52,000
dependencies create an image of the local file upload the image to a public or private dock or image

104
00:07:52,000 --> 00:07:54,600
repository and deploy it with elastic beanstalk.

105
00:07:54,610 --> 00:08:00,910
And of course you can add here if you wanted to that you can add here or rotate the logs to a tree from

106
00:08:01,080 --> 00:08:03,270
the environment directly.

107
00:08:03,300 --> 00:08:04,720
A software development project.

108
00:08:04,720 --> 00:08:08,560
So that's another good use case you have some friendly building project where application developers

109
00:08:08,560 --> 00:08:12,570
could be working on different compute with different operating systems.

110
00:08:12,610 --> 00:08:18,160
So what they can do is you can abstract the application code from the underlying compute or else by

111
00:08:18,160 --> 00:08:25,270
creating an identical environment by creating a darker image of the application and send it to all developers

112
00:08:25,270 --> 00:08:29,170
to basically create a file of the application send it to all developers.

113
00:08:29,170 --> 00:08:35,320
They can develop based on that and the Beanstalk anti-pattern when not to use that first one if you

114
00:08:35,320 --> 00:08:40,600
know exactly and you have the skills and resources and you know exactly what services you want to use

115
00:08:40,630 --> 00:08:45,370
and how they will work and how they need to be configured and everything and you would like to have

116
00:08:45,370 --> 00:08:48,910
a lot of control then you can go to cloud formation.

117
00:08:48,910 --> 00:08:50,740
In that case if you know everything about it.

118
00:08:50,820 --> 00:08:56,260
You have complete control over the resource configuration is required then cloud formation or assault

119
00:08:56,290 --> 00:08:57,340
will be the way.

120
00:08:57,650 --> 00:08:59,620
Right so that was about elastic beanstalk.

121
00:08:59,620 --> 00:09:05,650
Let's have a well-deserved break now and I will see you in another lecture with another interesting

122
00:09:05,800 --> 00:09:07,090
topic from yours.

123
00:09:07,120 --> 00:09:07,570
Thank you.
