Azure Monitoring
This is the continuation of azure learning series. In this section, we are going to discuss Azure Monitoring. Since, this is big post, hence divided into multiple. This is first part of monitoring.
- Azure monitor is relational new dashboard for all the monitoring activities across multiple applications or infrastructure.
- Its very diverse and everything is built at one place. This also means, we can setup metrics at resource group level or at individual resources.
- If you click on the Diagnostics settings as shown below, it will list all the resources like shown below.
- Now, let’s looks at VM level.
Here, you can see some sort of diagnostics already enabled. However, we can further turn on from diagnostics settings like “Enable guest-level monitoring”
- Now, the virtual machine is modified in order to throw off the diagnostics settings. So, if you don’t enable the agent, you won’t get the diagnostics at azure level.
- In order to have diagnostics, we need to have storage account, which got created internally while enabling the diagnostics.
- This storage account has 5 GB capacity. This additional storage will cost you money.
- In case, if your diagnostics agent is not working, then you can re-install the same by clicking the remove button and enable it again.
- In case, if you like to customize your diagnostics, you can certainly do that like shown below
- Let’s say we have dozens of resources and one fine day, something got messed up and all resources wiped out or screwed for some reason.
- How will you recover from that situation?
- The concept of baseline is “each of the resources should be stored as script or stored as template in ARM”.
- Let’s say, if we have all the resorces stored as ARM template in git, then that is considered as baseline.
- Either, I can click on redeploy option or download the ARM template from templates section.
- Other way to baseline is via powershell script. But, MS doesn’t generate powershell script from the environment rather, we can refer samples from Microsoft docs page and build our own and then push the same on git like from https://docs.microsoft.com/bs-latn-ba/azure/virtual-machines/windows/quick-create-powershell
powershell New-AzVm ` -ResourceGroupName "myResourceGroup" ` -Name "myVM" ` -Location "East US" ` -VirtualNetworkName "myVnet" ` -SubnetName "mySubnet" ` -SecurityGroupName "myNetworkSecurityGroup" ` -PublicIpAddressName "myPublicIpAddress" ` -OpenPorts 80,3389
Thanks,
Rahul Sahay
Happy Coding
Originally published at https://myview.rahulnivi.net on February 12, 2020.