A lot don't come back.
Let's talk about monitoring and logging in elastics beanstalk and the patterns and type patterns for
elastic beanstalk elastic beanstalk and cloud watch.
So that's being stopped automatically we use Amazon Cloud watch to help you monitor your application
and environments.
So basically what are saying is being beanstalk is integrated with cloud which you can define custom
metrics.
Also not only the standard ones for your own use an elastic beanstalk will push those metrics to Amazon
Cloud watch once you define the metrics you can view them in the Amazon cloud watch console.
You can also leverage Amazon cloud or alarms to help you implement decisions more easily by enabling
you to send notification automatically make changes like the alarms in cloud which I don't need to elaborate
on that but it helps you take actions based on specific events that could happen within your environment.
Last week when stock and cloud watch logs with cloud watch logs you can monitor and archive in cloud
watch logs itself which saves it indefinitely unless you're configured to do otherwise or it can even
send them to as three an archive your Lusignan took applications system custom log files from an easy
to instances of you environment.
You can also configure alarms that make it easier for you to react to a specific log stream events that
your metric filters extract.
So basically the cloud watch logs are going to send the logs from the servers from being stuck to a
specific log group.
And in that log group you can apply filters and based on the filters you can make alarms and based on
alarms you do actions or react to certain events which logs always been unable to do what you love no
matter what is going to install a log agent when it each instance in your environment which publishes
so that logs agent is what publishes the meta data points or the custom metrics to cloud service for
each log group you configure each log group from the cloud that your group applies its own filter patterns
to determine what logs team events to send to cloud watch as data points or as metrics as values for
metrics and these logs teams that belong to the same group will share the same retention monitoring
and access control settings.
You can configure elastic beanstalk to automatically stream logs to the cloud watch service in addition
to instant logs What else can I monitor with the watch logs if you enable Enhanced Health.
So this is a differentiator for lastic beanstalk that works.
Enhanced Health for our environment so it looks at the web server logs it looks at the code logs it
looks at the application errors if you want certain errors.
All that can be monitored by cloud watch logs.
You can configure that environment to stream health information to cloud watch log so its not only that
easy to instances but everything thats why we are saying when it comes to application the best is buying
stock from a visibility monitoring and automation perspective.
Things in the middle and cloud formation is the fire and the last one to provide detailed health information
about easy to instances running in your environment.
Elastic Winstock includes a health agent.
Now we have a cloud watch an agent and a health agent in the am right for each platform configuration
that supports Enhanced Health.
Remember when we were talking about the custom platforms and I told you that the lies that Winstock
has built for each different platform for each different programming language already have some customization.
Part of that is the health.
So if you are to customize one of the being stuck in mice to build a custom EMI with other softwares
that you need make sure that you are maintaining what it has done in them for health monitoring to maintain
that ability or that capability the health agent monitors with server blocks.
So we're looking now at the web server logs system metrics and relate them to elastic beanstalks service
elastic beanstalk will analyze the metrics along with data from elastic load balancing from an easy
to of scaling and provide an overall picture of the environment health.
So now if you see that what you're seeing ministroke is doing is looking at the software logs elastic
load balancer.
Look it's looking at all the scaling is it for instance is looking at all of that and analyzing that
and it provides on the concert on the dashboard you can see that your application is green OK with a
checkmark So you are good and it can provide different colors based on the health of your environment
based on the analysis that it has done on your behalf.
Now let's look at exporting logs to S-3 from cloud watch logs.
You can export log data that has been sent from beanstalk to cloud watch logs to an Amazon S3 bucket
and use this data in a custom processing analysis or to load it into other systems if in a scenario
in the exam part of plastic bins stock options where that you retain the logs to an S3 bucket that can
happen if you are told that it's going to be sent to clog watch logs and cloud watch will be configured
to send that to an S3 bucket of your choice.
That is also possible.
OK.
But in AABs works do you have the option to send the logs directly to a street.
No.
You have to send it to club watch logs and configure clock watch looks to archive it to s three to begin
the export process.
You must create an three bucket to store the exported log data.
So it's not the same bucket that elastic Winstock would create.
It's a different one.
In this case because we're talking about cloud watch logs sending to three.
You can store the exported files in your Amazon S3 bucket and define Amazon as the lifecycle to archive
that to Glacier automatically and you can export the logs from multiple groups or multiple time ranges
to the same as three bucket.
And if you want to separate the log data for each task.
This is more of this ops but you can have a Prefect's to each group and that Prefect's will allow you
to differentiate the logs in the common S-3 bucket.
Now let's look at logging where the docker platform configurations.
Can I do similar if I have used elastic beanstalk to deploy my application on a dock or container platform
looking with docker.
So specify that directory inside the container to which your application writes locks.
So now in your application you are instructed to apply the logs to a specific folder and then you can
configure the doctor to send the slug's or a certain logging folder that will be rotated saved locally
archived locally and then rotated or sent to the cloud trail elastic beanstalk is integrated with cloud
trail and it will send all the AP eyes as the other services are all you need to do is you need to configure
a trail and then all the logs of the API calls is going to be coming into your trail.
OK let's hop through the patterns and anti-protons and I promise you this is going to be the last thing
because I know elastic beanstalk we probably have spent a lot of time on it but it is worth it because
they use dark or they use logging and all that in a scenario and you are completely lost especially
with that gray area between Officeworks beanstalk and cloud formation that I hope we have already clarified
now and there is no ambiguity about the fine line differences between the different services.
So patterns when we use plastic bins or when we had advised advisement to use block mid-stroke if you
want to quickly deploy an application prototype for testing.
I don't know anything about it and I don't know anything about it as then just know enough about the
Winstock deployer application no or minimal knowledge about it its infrastructure when deploying an
application to it.
Yes that's a good use case.
Migrating with applications that are running on custom application servers on premise to it.
Yes.
So what do I need to do if I'm going to use Dharker you create a file include all its components and
dependencies create an image of the local file upload the image to a public or private dock or image
repository and deploy it with elastic beanstalk.
And of course you can add here if you wanted to that you can add here or rotate the logs to a tree from
the environment directly.
A software development project.
So that's another good use case you have some friendly building project where application developers
could be working on different compute with different operating systems.
So what they can do is you can abstract the application code from the underlying compute or else by
creating an identical environment by creating a darker image of the application and send it to all developers
to basically create a file of the application send it to all developers.
They can develop based on that and the Beanstalk anti-pattern when not to use that first one if you
know exactly and you have the skills and resources and you know exactly what services you want to use
and how they will work and how they need to be configured and everything and you would like to have
a lot of control then you can go to cloud formation.
In that case if you know everything about it.
You have complete control over the resource configuration is required then cloud formation or assault
will be the way.
Right so that was about elastic beanstalk.
Let's have a well-deserved break now and I will see you in another lecture with another interesting
topic from yours.
Thank you.