<?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>F1.2 - Stay sharp, be focused</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/f1point2/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/f1point2/feed.xml</link>
    <description>The information in this blog is provided &amp;#039;AS IS&amp;#039; with no warranties and confers no rights. This blog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. All code samples are provided &amp;#039;AS IS&amp;#039; without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose..</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:12:57 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Configuring PaaS and SaaS monitoring from Operations Management Suite</title>
      <link>https://docs.microsoft.com/archive/blogs/f1point2/configuring-paas-and-saas-monitoring-from-operations-management-suite</link>
      <pubDate>Tue, 14 Feb 2017 15:15:36 GMT</pubDate>
      <dc:creator><![CDATA[Graham Davies]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/f1point2/?p=205</guid>
      <description><![CDATA[In the previous article we published our Azure Web App which also had an Azure SQL Database backend....]]></description>
      <content:encoded><![CDATA[In the previous article we published our Azure Web App which also had an Azure SQL Database backend. Now we want to move onto the important business of monitoring it.

Out of the box, Azure does provide some metrics. You can see them if you log into the Azure portal and are described <a target="_blank" href="https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-monitor">here for Web Apps</a> and <a target="_blank" href="https://docs.microsoft.com/en-us/azure/sql-database/sql-database-single-database-monitor">here for Azure SQL Database</a>.

<img width="1024" height="626" class="alignnone size-large wp-image-225" alt="azureresourcemetrics_web" src="https://msdnshared.blob.core.windows.net/media/2017/02/AzureResourceMetrics_Web-1024x626.png" />

But this only allows for short term data retention and limited customisations of the dashboards, even with the ability to pin tiles to new dashboards.

For longer term data retention but also to improve correlation and data analysis, this data can be pulled into OMS following the guidelines <a target="_blank" href="https://blogs.technet.microsoft.com/msoms/2017/01/17/enable-azure-resource-metrics-logging-using-powershell/">here</a> and a script from the gallery <a target="_blank" href="https://www.powershellgallery.com/packages/Enable-AzureRMDiagnostics">here</a>. I'll run through it for the Azure Web App and the Azure SQL Database that we created <a target="_blank" href="https://blogs.technet.microsoft.com/f1point2/2017/02/14/contoso-university-create-and-configure/">earlier</a>. I will just enable Azure Metrics on the Resource Group we have created although you could enable for the whole subscription; the link gives all the details.
<ul>
 	<li>Open an elevated PowerShell command prompt and</li>
</ul>
<ul>
 	<li>Install the latest AzureRM modules<span style="color: #3366ff">install-module -Name AzureRM <span style="color: #000000">(enter y at prompt - you may get an error if modules are already installed.)</span>
</span></li>
</ul>
<ul>
 	<li>Save the Enable-AzureRMDiagnostics.ps1 script locally<span style="color: #3366ff">save-script -Name Enable-AzureRMDiagnostics -Path "C:\Temp"
</span></li>
</ul>
<ul>
 	<li>Change path to c:\temp and execute the script<span style="color: #3366ff">.\Enable-AzureRMDiagnostics.ps1 -ResourceGroup <span class="msportalfx-gridcolumn-assetsvg-text">rg-contosouni-gd</span>  <span style="color: #000000">(Note - you will need to change this to the name of your resource group that contains the Azure Web App and Azure SQL DB)
</span></span></li>
</ul>
<ul>
 	<li>You will need to run through the wizard once and select for the Azure Web App:
<ul>
 	<li>Subscription</li>
 	<li>Log Analytics Workspace</li>
 	<li>Resource Type ==&gt; Microsoft.Web/sites</li>
</ul>
</li>
 	<li>You will need to re-run the script and go through the wizard and select for the Azure SQL DB:
<ul>
 	<li>Subscription</li>
 	<li>Log Analytics Workspace</li>
 	<li>Resource Type ==&gt; Microsoft.Sql/servers/databases</li>
</ul>
</li>
 	<li>Now go to the OMS Solutions Gallery (through the OMS portal) or the Azure market place (through the Azure portal) and add:
<ul>
 	<li>Azure Web Apps Analytics</li>
 	<li>Azure SQL Analytics</li>
</ul>
<table style="width: 100%">
<tbody>
<tr>
<td style="text-align: center">Azure Web Apps Analytics</td>
<td style="text-align: center">Azure SQL Analytics</td>
</tr>
<tr>
<td><img width="158" height="298" class="aligncenter" src="https://msdnshared.blob.core.windows.net/media/2017/02/AzureResourceMetrics_Web_SG.png" /></td>
<td><img width="160" height="297" class="aligncenter" src="https://msdnshared.blob.core.windows.net/media/2017/02/AzureResourceMetrics_Web_SQL.png" /></td>
</tr>
</tbody>
</table>
</li>
</ul>
<ul>
 	<li>In about 15 minutes you should start to get metrics</li>
</ul>
<blockquote>
<p style="text-align: center"><span style="color: #3366ff">If you need to onboard PaaS and SaaS resources that are in a different subscription from your log analytics workspace then you can run the script and pass it parameters</span></p>
</blockquote>
<ul>
 	<li>.\Enable-AzureRMDiagnostics.ps1 -WSID "/subscriptions/fd2323a9-2324-4d2a-90f6-7e6c2fe03512/resourceGroups/OI-EAST-USE/providers/Microsoft.OperationalInsights/workspaces/OMSWS" -SubscriptionId "fd2323a9-2324-4d2a-90f6-7e6c2fe03512" -ResourceType "Microsoft.Sql/servers/databases" -ResourceGroup "RGName" -Force</li>
</ul>
<blockquote>
<p style="text-align: center"><span style="color: #3366ff">The above command line will take in parameters and execute silently without prompting using Force.</span></p>
</blockquote>]]></content:encoded>
    </item>
    <item>
      <title>Contoso University - create and configure</title>
      <link>https://docs.microsoft.com/archive/blogs/f1point2/contoso-university-create-and-configure</link>
      <pubDate>Tue, 14 Feb 2017 12:27:32 GMT</pubDate>
      <dc:creator><![CDATA[Graham Davies]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/f1point2/?p=135</guid>
      <description><![CDATA[The first step is to create and configure an Azure Web App and Azure SQL Database. If you already...]]></description>
      <content:encoded><![CDATA[The first step is to create and configure an Azure Web App and Azure SQL Database. If you already have one then you can skip this step.

I have used a project called Contoso University which can be downloaded from <a target="_blank" href="https://code.msdn.microsoft.com/ASPNET-MVC-Application-b01a9fe8/view/Discussions#content">here</a>.
<ul>
 	<li>Unzip the folder and you'll find another folder called C#. Extract this and perhaps change the name to ContosoUni.
[gallery size="full" link="file" ids="145"]</li>
</ul>
<ul>
 	<li>We'll need to create some resources to publish our project into e.g. an Azure SQL Database. You can either create all the resources manually or you can edit <a target="_blank" href="https://1drv.ms/t/s!AqRNuSjcGkp_5WHsfX0MMGYpqcVy">this script</a> and change the lines that will be specific for you.</li>
</ul>
<ul>
 	<li>When the script completes you should see the following resources in Azure:
<img width="1024" height="285" class="wp-image-165 size-large" alt="contosouniproject_2_azureresources" src="https://msdnshared.blob.core.windows.net/media/2017/02/ContosoUniProject_2_AzureResources-1024x285.png" /></li>
</ul>
<ul>
 	<li>Now open the Visual Studio project. You'll be prompted a couple of times; click OK and we'll configure the project to work with Visual Studio 2015.</li>
</ul>
<ul>
 	<li>Next you will need to edit the Web.config file
<img width="300" height="300" class="alignnone size-medium wp-image-166" alt="contosouniproject_3_webconfig" src="https://msdnshared.blob.core.windows.net/media/2017/02/ContosoUniProject_3_WebConfig-300x300.png" /></li>
</ul>
<ul>
 	<li>And change v11.0 to MSSQLLocalDB (as below). From
&lt;connectionStrings&gt;
&lt;add name="SchoolContext" connectionString="Data Source=(LocalDB)\<span style="color: #993300">v11.0</span>;Initial Catalog=ContosoUniversity2;Integrated Security=SSPI;" providerName="System.Data.SqlClient" /&gt;
&lt;/connectionStrings&gt;
To:
&lt;connectionStrings&gt;
&lt;add name="SchoolContext" connectionString="Data Source=(LocalDB)\<span style="color: #993300">MSSQLLocalDB</span>;Initial Catalog=ContosoUniversity2;Integrated Security=SSPI;" providerName="System.Data.SqlClient" /&gt;
&lt;/connectionStrings&gt;</li>
</ul>
<ul>
 	<li>In Solution Explorer, right click the project and choose <strong>Manage NuGet Packages</strong></li>
</ul>
<ul>
 	<li>A yellow bar will appear stating "Some NuGet packages are missing ..." - click the <strong>restore</strong> button at the end of this yellow bar</li>
</ul>
<ul>
 	<li>Save and exit Visual Studio</li>
</ul>
<ul>
 	<li>Open Visual Studio (Visual Studio needs a restart after restoring the NuGet packages</li>
</ul>
<ul>
 	<li>On the menu bar, choose Tools, NuGet Package Manager, <strong>Package Manager Console</strong></li>
</ul>
<ul>
 	<li>In the Package Manager Console, enter <strong>Update-Database</strong></li>
</ul>
<ul>
 	<li>Build the solution</li>
</ul>
<ul>
 	<li>On the menu bar, choose Project, Contoso University Properties, and select the <strong>Package/Publish SQL tab</strong></li>
</ul>
<ul>
 	<li>Change Configuration (top item) to <strong>Release</strong></li>
</ul>
<ul>
 	<li>Click <strong>Enable This Page</strong></li>
</ul>
<ul>
 	<li>Click <strong>Import from Web.config</strong></li>
</ul>
<ul>
 	<li>In the text box for Connection String to destination database: click the ellipse button at the end of the empty text box to configure  ...
<img width="1024" height="237" class="alignnone wp-image-185 size-large" alt="contosouniproject_4_configure_destination_db" src="https://msdnshared.blob.core.windows.net/media/2017/02/ContosoUniProject_4_Configure_Destination_DB-1024x237.png" /></li>
</ul>
<ul>
 	<li>Enter the details for the Azure SQL Database that we created with the PowerShell script (or which you created in some other way).
<img width="768" height="1024" class="alignnone size-large wp-image-195" alt="contosouniproject_5_configure_destination_db_2" src="https://msdnshared.blob.core.windows.net/media/2017/02/ContosoUniProject_5_Configure_Destination_DB_2-768x1024.png" /></li>
</ul>
<ul>
 	<li>Change the Database Scripting Options to <strong>Schema and Data</strong></li>
</ul>
<ul>
 	<li>Save and Build</li>
</ul>
<ul>
 	<li>Publish to Azure</li>
</ul>
<ul>
 	<li>Select <strong>Microsoft Azure App Service</strong></li>
</ul>
<ul>
 	<li>Select your <strong>Subscription</strong></li>
</ul>
<ul>
 	<li>Select the <strong>Resource Group</strong></li>
</ul>
<ul>
 	<li>Select the <strong>Web App</strong></li>
</ul>
<ul>
 	<li>Click <strong>OK</strong></li>
</ul>
<ul>
 	<li>On the Publish window that pops up, you are on the Connection tab - click <strong>Validate Connection</strong></li>
</ul>
<ul>
 	<li>On the Publish window select the <strong>Settings</strong> tab and ensure that:
<ul>
 	<li>Configuration states <strong>Release</strong></li>
 	<li>File Publish Options (leave deselected)</li>
 	<li>Database - <strong>Enable the new database publishing improvements</strong></li>
 	<li>Re-enter the connection details to the Azure SQL DB as listed above</li>
 	<li>Check both items under this:
<ul>
 	<li>Use this connection string at runtime</li>
 	<li>Execute Code First Migrations</li>
</ul>
</li>
 	<li>Click <strong>Publish</strong></li>
</ul>
</li>
</ul>
<ul>
 	<li>You should now see the website with some data populated</li>
</ul>
<ul> 
	<li>In the next article, I'll look at monitoring this with Operations Management Suite using the Azure Metrics that are in Public Preview</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Monitoring PaaS and SaaS Applications - SCOM or OMS?</title>
      <link>https://docs.microsoft.com/archive/blogs/f1point2/monitoring-paas-and-saas-applications-scom-or-oms</link>
      <pubDate>Tue, 14 Feb 2017 12:00:55 GMT</pubDate>
      <dc:creator><![CDATA[Graham Davies]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/f1point2/?p=125</guid>
      <description><![CDATA[As you make your move to Azure and embrace PaaS and SaaS solutions, one key choice you have to make...]]></description>
      <content:encoded><![CDATA[As you make your move to Azure and embrace PaaS and SaaS solutions, one key choice you have to make is how to manage and monitor your Azure services. Two options from the Microsoft stack are:

<strong> System Center Operations Manager</strong> - the mature on-premises solution for which an Azure Management Pack has just been released.

<strong>Operations Management Suite</strong>; the PaaS and SaaS solutions are in public preview at the moment.

In this series of articles, I'll look at the Operations Management Suite and:
<ul>
 	<li><a href="https://blogs.technet.microsoft.com/f1point2/2017/02/14/contoso-university-create-and-configure/" target="_blank">Configuring a web application that uses a database backend (An Azure Web App with Azure SQL Database)</a></li>
 	<li>Configuring PaaS and SaaS Monitoring from Operations Management Suite</li>
  	<li>Integrating the monitoring with Power BI for even richer visualisations</li>
	<li>Configuring Application Insights monitoring and integrating with the Operations Management Suite</li>
</ul>
&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>