Azure Application Insights – Using Squared Up Web API


Many of you know Squared Up for their powerful HTML 5 dashboard solution for SCOM. It does an awesome job displaying data in a fast and easy way. There is also a way to display OMS data within the dashboard using the OMS tile. Although this is very cool as you are able to combine SCOM data and OMS data into one single dashboard. Wouldn’t it be even more awesome to get Azure Application Insights data into the dashboard as well? In this post I want to show you how to hook up Azure Application Insights and Squared Up to display data.

The final demo dashboard looks like this…


…it shows you a table with requests from different cities accessing my blog additionally a distinct count of countries in the past 7 days. Before we configure Squared Up, we need to configure the API key to access Azure Application Insights data. Go to your application which is monitored by Azure Application Insights, in the menu select API Access and click Create API key. For accessing the data we choose Read telemetry permission, then make sure you copy the Application ID


Continue reading

Quick Post – SCOM 2016 Upgrade Notes


During my Discussion Panel: Monitoring, Insights & Analytics together with my buddy MVP Kevin Greene at Experts Live Europe in Berlin, we mostly spent time discussing concerns about upgrading to SCOM 2016. A lot attendees were interested what are possible pitfalls, what are the experiences from the field and what is possibly the best upgrade strategy. Some time ago I wrote a post about upgrade strategies and when you should take what path. In addition you will find additional learnings at the end oft the post.

In addition to the post I have a list of pitfalls which you might useful and were discussed during that talk.

  1. The #1 problem is that SCOM 2016 agent crashes IIS application pools which run under .NET 2.0. This is still an issue and NOT solved with UR3!
  2. In the monitoring view pane, there is a new node for scheduling maintenance mode feature. This will shoot an error as soon you start trying to set a scheduled maintenance mode window. Kevin Holman provides detailed steps how to fix this issue.
  3. When you deploy a SCOM 2016 agent to a domain controller, you might see it goes into a heartbeat failed state immediately and turning the agent turns “grey”. Kevin Holman provides again a detailed step how to fix this issue. Check out Waleed Mostafa’s Dolphin tool, which can easily be used to configure these settings.
  4. The SharePoint 2010 management pack does not work with SCOM 2016.
  5. There is a great collection of RECOMMENDED registry settings which you need to apply for your brand new shiny SCOM 2016. This will tweak some registry settings on the management servers to run more smoothly.
  6. The DNS MP Windows Server DNS 2003/2008/2008 R2/2012/2012 R2 ( report an “Internal-Script-Error” which is described here.
  7. Make sure you adjust your antivirus exclusion to the new program path. Because the agents are installed under a new folder path, there is a need to adjust the AV exclusions. Here you will find all necessary exclusion path.
  8. If you need to check the sizing for SCOM 2016 the SCOM 2012 sizing sheet is still valid. Except for handling Linux agents. SCOM 2016 can monitor twice as much Linux/Unix agents per management server as SCOM 2012 R2.
  9. How to generate a list of agents that are multi-homed via the Microsoft Operations Manager console.
  10. If you want to migrate notification subscriptions MVP Cameron Fuller has wrote a still valid post.
  11. Check the latest UR for your SCOM installation here.
  12. What SQL maintenance should I perform on my SCOM 2016 databases?
  13. Enable proxy as a default setting in SCOM 2016.
  14. If you install the SCOM 2016 console and the SCSM 2016 console on the same server you will run into an issue. This is still a problem and I have blogged about a workaround.
  15. Depending on the migration scenario make sure you match the supported configurations for SCOM 2012 R2 and SCOM 2016 at all times.
  16. The upgrade procedure itself is well documented here.

This probably a good checklist if you are planning your SCOM 2016 migration. Please study each bullet carefully and take the necessary actions. From my experience the upgrade / migration experience is runs without any issues if you plan carefully and make sure your management group is in good / healthy shape. If you have additional bullets / issues I should refer to, please drop a comment. Thanks!

Azure Logic App – Send Data From Application Insights To Azure Log Analytics


If you followed the Ignite 2017 announcements and Microsoft’s latest trends you figured out that serverless applications are getting more and more boost in Microsoft’s cloud strategy. Logic Apps is one of these new awesome iPaaS (integration Platform as a Service) services, which let’s you reduce complexity, coding and also headache :). Microsoft summarizes the Logic Apps like this…

Logic Apps provide a way to simplify and implement scalable integrations and workflows in the cloud. It provides a visual designer to model and automate your process as a series of steps known as a workflow. There are many connectors across the cloud and on-premises to quickly integrate across services and protocols. A logic app begins with a trigger (like ‘When an account is added to Dynamics CRM’) and after firing can begin many combinations of actions, conversions, and condition logic.

I would like to share one example of such an integration between systems. The goal is to send data from Application Insights (AI) to Azure Log Analytics (ALA). As you know, Microsoft changed the Log Analytics backend to Kusto, which is the same system that is using Application Insights. There is a solution available for OMS which imports the data from Application Insights to Azure Log Analytics. BUT there could be cases, where you want to insert custom data from AI to ALA on a regular schedule, which is not available through this connector. This is exactly what I want to show you in this blog post. This is not a real world scenario, but gives you a pretty good idea how it works and how powerful it can be.

In Azure I created a Logic App which looks like this…


Continue reading

OMS – Upgrade Workspace Error


Few weeks ago Microsoft introduced the new Azure Log Analytics query language to OMS Log Analytics. In order to use the new language with your workspace you need to upgrade your current workspace. It is very simple and basically a one-click experience and there are new features available as MVP Marcel Zehner describes in his blog post. Microsoft also claims to have upgraded 1000s of workspaces without any issues.

One problem I ran into upgrading my workspace was an error. I clicked Upgrade Now…


…after few seconds I received this error…


Continue reading

Azure Automation – Up / Down Scale Azure VM


Recently I made a couple of demos how you could benefit from Azure Automation acting on certain alerts. One demo was, if an OMS or Azure Monitor alert is triggered because of high CPU on your Azure VM, a webhook will be called and scale up the Azure VM to a predefined size.


In Azure Monitor you are able to create an Alert and set the threshold to e.g. 80%…


…and then call a webhook…


Note: Azure Monitor has already built-in alert action to start / stop a virtual machine or even scale up / down. These actions install and call pre-configured Azure Automation runbooks from Microsoft. But this post should show you in a transparent way how you can achieve it, doing it yourself.

As you probably know in OMS you are also able to provide a webhook in your alert settings…


Which ever way you choose Azure Monitor or OMS, it does not matter. I just want to provide you the PowerShell script I used in Azure Automation. Although it is far from complete and production level, but as demo it serves it’s purpose Smile.

# Get automation credential for authenticating and resizing the VM
$Credential = Get-AutomationPSCredential -Name 'AzureScaleUser'
# Size of the VM like Standard_D1_v2, Standard_D2_v2
$HWProfile = Get-AutomationVariable -Name 'ScaleUpSize'
# Resource group where the VM is living in
$ResourceGroup = Get-AutomationVariable -Name 'ResourceGroup'
# Subscription which hosts the VM / account etc.
$SubscriptionId = Get-AutomationVariable -Name 'SubscriptionID'
# VM name you want to up / down scale
$VMName = Get-AutomationVariable -Name 'VMName'
# Login to azure
Add-AzureRMAccount -Credential $Credential  -SubscriptionId $SubscriptionId
# Get the VM
$VM = Get-AzureRmVM -Name $VMName -ResourceGroupName $ResourceGroup

If ($VM.HardwareProfile.VmSize -eq $HWProfile)
     Write-Output "HW size already set to $($VM.HardwareProfile.VmSize)"
     Write-Warning "Scaling up to $HWProfile"
	 # Set new VM size
     $VM.HardwareProfile.VmSize = $HWProfile
	 # Update VM
     Update-AzureRmVM -VM $VM -ResourceGroupName $ResourceGroup
     Write-Output "HW scaling up to $($VM.HardwareProfile.VmSize)"

My Azure Automation variables look like this…


I hope this helps you for your next demo / PoC or what ever project you need it for.

ARM Template – Deployment Error “[Subscription().SubscriptionId]” The request is invalid…


Recently I authored some ARM stuff in Visual Studio and I had a need for getting the current subscription ID the template is being deployed to.  So there is a helper function you can call like this…

“subscriptionId”: “[subscription().subscriptionId]”

I used it in the template like this…


…but as soon I tried to deploy the template, I hit this error all the time…

“code”: “BadRequest”, “message”: “{\”Message\”:\”The request is invalid.\”,\”ModelState\”:{\”\”:[\”Invalid JSON primitive: 328de222-1a51-458a-96be-6770259e84c0.\”]}}”


I am not sure why this happen, but I figured out a workaround. If I concatenate the entire subscription id, it would work like this…


I hope this saves you some headache!