Azure Virtual Machine Memory Counter Values in an Azure Dashboard

Published On: 2021-06-01By:

Recently a client asked me to put the memory usage for their Virtual Machines on an Azure Dashboard. Sadly this metric isn’t available in the normal Azure Dashboard selection. The available metrics are related to CPU, Network, and Disk (IO) but not the memory of the virtual machine.

To pull up the memory data I had to work through a couple of easy steps. The first step was to feed data to Azure Log Analytics. After that a quick KQL query would pull the most recent memory counter data. The needed KQL query is pretty straight forward.

Perf
| where ObjectName == "Memory" and
(   CounterName == "% Committed Bytes In Use" 
)
|  summarize avg(CounterValue) by bin(TimeGenerated, 15min), Computer, _ResourceId 
| render timechart

If you want to filter this down to a set of specific machines that can be done by adding in a little bit to the where clause of the KQL script to match the computer name. In the example KQL code below we are looking for all the machines with “Web” in the machine name. This is done by adding ‘and Computer contains “Web”‘ into the where clause of the script.

Perf
| where ObjectName == "Memory" and Computer contains "Web" and
(   CounterName == "% Committed Bytes In Use" 
)
|  summarize avg(CounterValue) by bin(TimeGenerated, 15min), Computer, _ResourceId 
| render timechart

When the first sample query is run it’ll produce a graph similar to the one shown below. Each line is a separate Azure Virtual Machine (the machine names aren’t being shown for obvious reasons). Several different chart options are available from Log Analytics, but personally, I prefer a line chart for this (Meagan may disagree with me here, and she’s probably correct but I’m stubborn).

Once the script is created push the Pin to dashboard button and the graph (and the script which creates it) will be pushed to the dashboard which you select.

Once the script is pushed to a dashboard the graph can be seen much like the one below. You can edit the properties and make the title and subtitle a little more useful. By default, the values will be pretty useless but you can make them meaningful.

Once that’s done you have the memory counters for the selected virtual machines on an Azure Dashboard.

Denny

Contact the Author | Contact DCAC

SQL Server Replication Publishers and non-standard SQL Server Ports

Published On: By:

People use non-standard ports for the default instance of SQL Server. What I mean by this is a port number other than 1433. In you use a non-standard port for SQL Server and you plan on using a remote publisher for SQL Server Replication, then this post is for you.

When you go to setup replication and tell your new publisher where your distributor is you’ll get an error message back which is less then helpful, telling you that you can’t connect due to a password error.

This error message is lying to do. The problem is that replication doesn’t understand non-default ports all that well and you need to trick the replication setup process to accept that you are using non-default ports. In order to fix this, connect to the distributor in Object Explorer, right-click on Replication and click on Distributor Properties. When the Distributor properties window opens, click on Publishers on the left. Then click Add, to add a new publisher. (You should already have a new publisher listed with with server name and the port number.) You’ll want to add in another entry for just the server name.

When you add the server name version, the wizard will give you an error saying that it can’t connect to the server name, and it will ask if you want to keep the server entry. When it error comes up, click Yes. This will add the server name entry to the list, and allow you to connect your publisher to the distributor.

Once you have added in the connections to the server name as well as to the port number version of the server name, the server list should look something like this.

Denny

Contact the Author | Contact DCAC

Office 365 Self Service Password Change (SSPR) with AD Connect behind Azure Firewall

Published On: 2021-05-25By:

One of the great things about Office 365 / Azure Active Directory accounts is that the end-users can reset their password and that password change will change their on-premises Active Directory password as well as their Azure Active Directory password. This all works wonderfully until you put the server which is running AD Connect (the software that syncs your Active Directory to Azure Active Directory) behind the Azure firewall, and you start blocking traffic from the AD Connect server.

In my configuration, I had access on ports 80 and 443 to the AzureActiveDirectory service tag, like everything online says is needed. But users were still getting an error when doing password resets in the Office 365 portal. The weird thing was, that I couldn’t see anything getting blocked by the Azure Firewall.

I created an outbound rule for the specific IP Address and allowed ports 80 and 443 with a target service tag of “AzureCloud”. This grants this machine access to the known Microsoft Azure front end IP address ranges; which appears to allow the Self Service Password Change features to begin working.

Denny

Contact the Author | Contact DCAC

Creating a Linked Server from Managed Instance to Azure SQL DB

Published On: 2021-05-18By:

When creating a linked server over a private endpoint from a Azure SQL Managed Instance to an Azure SQL DB database there’s one very important think to keep in mind. The username will not be in the “normal” format. When creating a linked server between an MI and SQL DB you need to append “@servername” to the end of the username in the linked server properties.

If your SQL DB servername was “devsql1” and you were using a login of “link1” to connect to the server you would need to use the username of “link1@devsql1” when you create the linked server on the Azure SQL Managed Instance.

Denny

Contact the Author | Contact DCAC
1 2 3 489

Video

Globally Recognized Expertise

As Microsoft MVP’s and Partners as well as VMware experts, we are summoned by companies all over the world to fine-tune and problem-solve the most difficult architecture, infrastructure and network challenges.

And sometimes we’re asked to share what we did, at events like Microsoft’s PASS Summit 2015.

Awards & Certifications

Microsoft Partner   Denny Cherry & Associates Consulting LLC BBB Business Review    Microsoft MVP    Microsoft Certified Master VMWare vExpert
American Business Award 2021 Gold    American Business Award 2021 Bronze    FT Americas’ Fastest Growing Companies 2021   INC 5000 Award for 2020    American Business Awards People's Choice    American Business Awards Gold Award    American Business Awards Silver Award
FT Americas’ Fastest Growing Companies 2020       Best Full-Service Cloud Technology Consulting Company       Insights Sccess Award    Technology Headlines Award
Share via
Copy link