Chapter 7. Continuous Monitoring in Cloud Platform
The vision is really about empowering workers giving them all the information about what's going on so they can do a lot more than they've done in the past. –Bill Gates
We have already completed the Continuous Integration (CI) and Continuous Delivery (CD) part of the vision for application deployment. In this chapter, we will cover another stepping stone in achieving end-to-end automation and that is continuous monitoring.
We will cover the importance of monitoring and the different ways to monitor and troubleshoot Azure Web Apps and App Service Environment (ASE) so we can ensure that applications remain problem free and highly available. The following topics will be covered in this chapter:
- Overview of continuous monitoring
- Azure Web Apps diagnose and monitoring
- Azure Application Insights for application monitoring
- Architecture...
Overview of continuous monitoring
CI and CD result in faster time-to-market. That being said, what if something goes wrong in this automated approach? Do we still need to do manual things or any automated or hybrid approach is available to monitor and manage this automation process?
Another question is what to monitor?
The following points can be some of the factors that needs monitoring:
- Static code analysis – code is not up to the quality gate defined
- Failure of the CI process
- Infrastructure or platform issues where an application needs to be deployed
- Application issues
If we observe properly, then it is all about notifications, infrastructure management, and application monitoring. We already configured notifications in VSTS for alerts and notifications in case of build or release failures. Let's see how we can monitor and manage Azure Web Apps or Azure App Service.
Continuous monitoring not only helps us identify the issue or find the main cause of issue, but it also helps to fix issues to keep...
Azure Web Apps troubleshooting and monitoring
Azure App Service / Azure Web Apps comes with Diagnose and solve problems
to find out about the resource health and solutions to some common problems.
Let's dive deep into Diagnose and solve problems to get more details.
Diagnose and solve problems
Go to Azure App Services
and select the Azure web application that we created earlier. Click on Diagnose and solve problems.
Another pane will be opened that will have the Health and Troubleshoot indicator and solution to some common problems.
We can see that the MyPetClinicProj
Azure web application is available and running normally based on the status and the green indicator:
In my encounter with Azure Web Apps, I have faced the HTTP 5xx errors many times due to various reasons. It is also important to identify the root cause of an issue to fix it. However, there are some quick solution/suggestions given here.
Azure App Services – Resource health
We can get details on the health of a web application from...
Architecture of disaster recovery and high availability of Azure web applications
Microsoft Azure traffic manager allows failover, performance, or weighted round robin methods to determine how a request can be satisfied using Azure App Services. Traffic manager applies the traffic routing method to each request and routing method decides how that request will be served and by which endpoint. Endpoints are nothing but Azure web application in our context. We have two Azure web applications so we can consider them as our endpoint.
In the Resource Management
portal, the terms have been changed, as given here:
- The Load-balancing method is known as the Traffic-routing method now
- The Failover method is known as the Priority method
- The Round-robin method is known as the Weighted method
- The Performance method is known as the Performance method
To make Azure web application highly available, let's consider a scenario where our PetClinic
application is deployed in a different ASP.
If an ASP is created in...
Load testing using a URL-based test and Apache JMeter
Once we have deployed our application in Azure App Services successfully, we can perform load testing on Azure App Service or Azure Web Apps. Let's see how we can use VSTS to perform testing.
In the top menu bar, click on Test
and then click on Load tests
. Let's create our first test in VSTS and execute it:
- Click on
+New
and select URL based test
:
- Verify the
HTTP method
and URL
:
- Click on
Settings
and provide inputs in different parameters based on need:
- Click on
Save
and click on Run test
:
- Load testing is in progress:
- Verify the complete test data as and when it is available in the VSTS portal:
- Verify the final summary of URL-based test execution in VSTS:
- We will also get the
Performance
and Throughput
charts after the test execution in VSTS:
- Verify
Tests
and Errors
related details too:
We have seen how the URL-based test can be performed on Azure web application. In the next section, we will cover how to use Apache JMeter for load...
In this chapter, we covered basic Azure App Service monitoring, basic troubleshooting, Kudu editor, traffic manager for load balancing using Azure App Service endpoints, URL-based tests in VSTS, load testing with Apache JMeter, and executing Apache JMeter tests from VSTS.
So, in this book we covered continuous integration, continuous delivery, Microsoft Azure App Services (PaaS) to deploy our sample JEE-based application, basic monitoring and troubleshooting available in Azure, and load testing available in VSTS.
Every new beginning comes from some other beginning's end - Seneca