This is part five of a five-part series on the “Development of a Django web app from testing to production and hosting onto Microsoft Azure’s virtual machine”.
The series will be split into the following topics:
- Part 1: Developing the Django Web App: Here, we improved the “Restful A.P.I.s in the Django Project” we built by building its UI/Web platform as it was only accessible via postman, to access the system via web interface with more features. Click here to go through the article.
- Part 2: Acquire a VM from Microsoft Azure: Here, we went through choosing the best VM with regards to cost and performance. Click here to go through the article.
- Part 3: Setting up the VM and uploading of Project using GIT: Click here to go through the article.
- Part 4: Configuring the Django project on the VM and making it accessible online: Click here to go through the article
- Part 5: Monitoring of the Django Web App using Microsoft Azure Tools
Intended audience: Who the article is for
It is for a developer who wants to know how to monitor their Microsoft Azure virtual machine status and progress and for readers following up on the series.
Case Study: What the article is going to cover
We will look into how to use Microsoft Azure tools to monitor and troubleshoot common virtual machine problems.
- A virtual machine in Microsoft Azure, here’s how to get one
Log into Microsoft Azure
Select your virtual machine from the “Recent resources” section
This will display the page below
To get monitoring or statistical details regarding the performance and use of the virtual machine, click the tab on the page that’s labelled “Monitoring”
Scrolling down after clicking on the “Monitoring” tab will reveal the following:
- Average CPU usage
- Average network usage
- Average disk read and write bytes
- Average memory usage
These statistics will advise you on whether you need to scale up or down your virtual machine.
One way of reducing your VM consumption is by stopping it during periods when you know it will be inactive. You can do so by clicking the “Stop” button at the top of the VM overview page.
If you have trouble connecting to the VM you could refresh the VM or restart it by clicking on the “restart” or “refresh” buttons.
To scale up or scale down your VM server, click on the “Size” menu on the left navigation menu, where it will take you to a page for you to select the different VM sizes you want to scale up or down to at an instant. Remember this will affect your costs if you choose to pay for the service.
To diagnose and solve any problems, you can also click on the “Diagnose and solve problems” menu on the left navigation menu.
To view or create any VM ports for networking purposes, click on the “Networking” menu on the left navigation menu. Here you will be able to open and close any inbound or outbound ports.
Microsoft Azure also provides recommendations on how to make your VM perform better, these recommendations can be found after clicking on the “Advisor recommendations” menu on the left navigation menu.
If your VM server has a predetermined time when they will not be in use, you can set it to automatically shut down and restart during specific times, to save on costs. Do this by clicking on the “Auto-shutdown” menu on the left navigation menu.
To reset the VM password click on the “Reset password” menu on the left navigation menu.
To test any connections to your VM’s ports, you can do by clicking on the “Connection troubleshoot” menu on the left navigation menu. Where you will have a drop down options of the connections to test
You should now have a basic understanding of monitoring and troubleshooting any errors or bugs that you encounter with your VM.
Further improvements could be made on the VM such as:
- Logging into the VM via SSH Public Key
- Linking an SSL to your VM
- Linking a DNS to your VM
Any further questions regarding how to use Microsoft Azure can be found on their website.
Please let me know how your experience was, Thank you.