<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Daniel Amadei Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/amadei/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/amadei/feed.xml</link>
    <description>Sharing what I’ve learned, in order to make partners &amp;amp; customers successful!</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:39:48 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Adding Guest Diagnostic Extension to an Existing VM Scale Set</title>
      <link>https://docs.microsoft.com/archive/blogs/amadei/adding-guest-diagnostic-extension-to-an-existing-vm-scale-set</link>
      <pubDate>Thu, 13 Sep 2018 10:40:29 GMT</pubDate>
      <dc:creator><![CDATA[Daniel Amadei]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/amadei/?p=45</guid>
      <description><![CDATA[There are some options to create a Virtual Machine Scale Set with the diagnostics extension to...]]></description>
      <content:encoded><![CDATA[There are some options to create a Virtual Machine Scale Set with the diagnostics extension to perform in-guest monitoring and collect metrics from inside your virtual machines.

On the other hand, if you have an existing Virtual Machine Scale Set without such extension there’s a way to enable them. This is what I’ll show in this post in a detailed way explaining how to configure each one of the parameters required.
<h3><strong>How do I know if I have diagnostics extension deployed or not?</strong></h3>
The first thing to notice if you are looking to monitor your guest VMs in a VM Scale Set is if you already have the extension deployed or not. This is easy to be accomplished by going to the VMSS page in the Azure Portal and clicking on Metrics. If there are no metrics available in the Guest section this means there’s no diagnostic extension installed and only metrics provided at the Host level, captured by the virtualization layer are available. The picture bellow shows this scenario:

<img src="https://msdnshared.blob.core.windows.net/media/2018/09/pic12.png" alt="" width="531" height="481" class="alignnone wp-image-135" />

So, as there’s no Guest metrics available, we can conclude that the extension is <strong>not</strong> installed and we can install it.
<h3><strong>Storage Account</strong></h3>
To hold diagnostics data we need a storage account provisioned, you can provision a new storage account or use an existing one.
<h3><strong>Getting the Default Config</strong></h3>
The first step to work with Azure VM Scale Set diagnostics is to get the default config. This is a template file we use to enable the diagnostics extension and also we can customize it to fit our needs.

You can run the following command to get the VMSS diagnostic config file and send it to a file named <strong>config.json</strong>:

az vmss diagnostics get-default-config &gt; config.json

You will notice that a <strong>config.json</strong> file will be generated in the current folder while another JSON will be output to the screen. Copy this JSON as it will be the one you will use to put protected data like the Storage Account SAS Token and place it in a file called protected-settings.json. We will use both files.

<img src="https://msdnshared.blob.core.windows.net/media/2018/09/pic21.png" alt="" width="701" height="79" class="alignnone wp-image-145" />

Fill the protected-settings.json with the storage account information. In the storageAccountName field, enter the name of the storage account you provisioned to hold diagnostics data and in the storageAccountSasToke enter a SAS token you can generate in the storage account in the Shared access signature section. Just make sure you don’t include the question mark. Also make sure you select a large time frame for the token or you will have to update it later as by default it is valid for just a few hours.

The resulting config will look like the following:

<img src="https://msdnshared.blob.core.windows.net/media/2018/09/pic31.png" alt="" width="1782" height="165" class="alignnone size-full wp-image-155" />

Go back to the <strong>config.json</strong> file. There you should also enter the name of the storage account in the <strong>StorageAccount</strong> field and you should also enter the resource ID of the VM Scale Set into the <strong>resourceId</strong> field. You can get this resource ID in the Azure Portal clicking the VM Scale Set, then Properties, copy the resource ID and paste it into this field. It should be in the format /subscriptions/&lt;subscription id&gt;/resourceGroups/...
<h3><strong>Apply the setting</strong></h3>
Apply the setting with the following command:

<strong>az vmss diagnostics set --resource-group vmss-diags-demo --vmss-name vmssdiagdemo --settings config.txt --protected-settings protected-settings.json</strong>

After the application, inspect that the extension is now added to the VMSS as shown in the picture bellow:

<img src="https://msdnshared.blob.core.windows.net/media/2018/09/pic4.png" alt="" width="311" height="287" class="alignnone wp-image-165" />
<h3><strong>Verify the setting</strong></h3>
After applying the setting, we can verify it by going back to the Azure Portal and when we go to the Metrics section, we can see that the Guest namespace is now available and the Guest metrics are all available as well.

<img src="https://msdnshared.blob.core.windows.net/media/2018/09/pic5.png" alt="" width="782" height="200" class="alignnone wp-image-175" />
<h3><strong>Summary</strong></h3>
This concludes this post, I hope it’s useful for you to enable Guest diagnostics to your virtual machine scale set VMs and make use of it be for monitoring or alerting.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Hello world!</title>
      <link>https://docs.microsoft.com/archive/blogs/amadei/hello-world</link>
      <pubDate>Tue, 19 Sep 2017 14:21:20 GMT</pubDate>
      <dc:creator><![CDATA[Shivkumar S]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/amadei/?p=1</guid>
      <description><![CDATA[Welcome to Developer Network. This is your first post. Edit or delete it, then start blogging!]]></description>
      <content:encoded><![CDATA[Welcome to <a href="https://blogs.msdn.microsoft.com/">Developer Network</a>. This is your first post. Edit or delete it, then start blogging!]]></content:encoded>
    </item>
  </channel>
</rss>