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.
- If we look for services and just search for monitor, it will come like this.
- 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”
- Once, we enable the same. We will get like this.
- Here, you can see all potential counters are listed.
- Similarly, we can have Agent.
- 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
- Clicking on save button will restart the agent.
Baseline for Resources
- 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.
- I can go to individual deployments and
- 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
Alerts and metrics
- When we are talking about diagnostics settings. Alerts and metrics are also part of that.
- I can go ahead and set up alert like
- Next, we need to setup, action group like shown below
- Here, we can enable azure push notifications as well. In that case, owner will get the alerts.
112 total views, 1 views today