<?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>about operations management ...</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/madias/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/madias/feed.xml</link>
    <description>References on System Center and Azure Management Services</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:23:23 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Analyzing Backup Activity with PowerBI</title>
      <link>https://docs.microsoft.com/archive/blogs/madias/analyzing-backup-activity-with-powerbi</link>
      <pubDate>Fri, 24 Nov 2017 16:27:45 GMT</pubDate>
      <dc:creator><![CDATA[MarcoDias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madias/?p=166</guid>
      <description><![CDATA[This time it’s all about Power BI.
The challenge was to visualize in some kind of calendar style...]]></description>
      <content:encoded><![CDATA[This time it’s all about Power BI.
The challenge was to visualize in some kind of calendar style the daily activity of backups.
Starting with a detailed activity log, adding a couple of calculated columns and measures, we´ve ended with a pretty slick looks that helps to understand bubbles of failed backups or empty slots that can be used for schedules.

<img width="600" height="536" class="alignnone size-medium wp-image-136" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/backupActivity01.png" />

In this particular example, the log comes from an export of the backup solution and the structure looked something like this:

<img width="600" height="536" class="alignnone size-medium wp-image-136" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/backupActivity02.png" />

Not bad, at least there’s no need to major data transforms or aggregations.
So now is just a simple import into Power BI and start creating some calculated columns and measures like such:

<em>Client Details = BackupActivity[Client Name] &amp; " - " &amp; BackupActivity[subclient] &amp; " -" &amp; BackupActivity[Backup Level]</em>
<em>Number Schedules = INT(RIGHT(BackupActivity[Result],find("/",BackupActivity[Result],1,2)-1))</em>
<em>Number Completed = INT(LEFT(BackupActivity[Result],find("/",BackupActivity[Result],1,2)-1))</em>
<em>Number Not Completed = BackupActivity[Number Schedules] - BackupActivity[Number Completed]</em>
<em>Percent Completed = SUM(BackupActivity[Number Completed])/sum(BackupActivity[Number Schedules])</em>

And after playing around with conditional formatting of 'Percent Completed' in a matrix

<img width="600" height="536" class="alignnone size-medium wp-image-136" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/backupActivity03.png" />

We´ll end up with a sort of heat map calendar structure that helps to discover some insights of backup activity.

<img width="600" height="536" class="alignnone size-medium wp-image-136" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/backupActivity04.png" />

<a href="https://github.com/madiasOnGit/PowerBI/tree/master/BackupActivity">Refer to this repo</a> ( https://github.com/madiasOnGit/PowerBI/tree/master/BackupActivity ) for the complete report.
Marco]]></content:encoded>
    </item>
    <item>
      <title>Mail Flow Round Trip test using Azure Automation and Azure Log Analytics</title>
      <link>https://docs.microsoft.com/archive/blogs/madias/mail-flow-round-trip-test-using-azure-automation-and-azure-log-analytics</link>
      <pubDate>Tue, 12 Sep 2017 15:44:09 GMT</pubDate>
      <dc:creator><![CDATA[MarcoDias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madias/?p=135</guid>
      <description><![CDATA[Every once in a while a customer asks if we can create a mail flow between different email systems...]]></description>
      <content:encoded><![CDATA[Every once in a while a customer asks if we can create a mail flow between different email systems and measure its roundtrip time.
So, this reference highlights one solution based on a PowerShell script that connects to one mailbox hosted in Exchange, sends a message to another mailbox hosted in Gmail, waits for its return and tracks the roundtrip time.

We can definitely run such a script from SCOM, but for this example I wanted to use as much of the new world ( Azure Management Services ) as I could.
<ul>
 	<li>The test will run in <strong>Azure Automation</strong> ( required to run the script )</li>
 	<li>Trigger in an interval by an <strong>Azure Logic App</strong> ( Although we can use a schedule in Azure Automation, with logic Apps we can have an interval as low as 1 minute )</li>
 	<li>The result will be sent to a<strong> Log Analytics</strong> Workspace ( required to store the test results )</li>
 	<li>Use <strong>Power BI</strong> report to have appealing visuals of the solution ( not required but cool )</li>
</ul>
Let´s start !!

<strong>Configure the test accounts:</strong>
I´ve just use my Microsoft account @outlook.com and a new Gmail test mailbox that I´ve configure to forward all incoming emails back to my account.

<strong>Configure script dependencies:</strong>
The script makes use of <a target="_blank" href="https://www.microsoft.com/en-us/download/details.aspx?id=42022" rel="noopener">Microsoft Exchange Web Services Managed API</a> so we need to make this available in the environment where the script will run.
Because we´ll be running in Azure Automation and Bartek Bielawski was so kind in providing a <a target="_blank" href="https://www.powershellgallery.com/packages/EWS/1.1" rel="noopener">wrapper around Microsoft.Exchange.WebServices library</a>, we only need to add the PowerShell module to an existing Azure Automation account.
Then, import the module and we can use simple commands such as Connect-EWSService or New-EWSMessage to connect to the mailbox and send or retrieve messages.
Finally, add the credential and the Log Analytics Workspace ID and Key variables to the automation account assets library so that they can be securely retrieved during runtime:

<em>$cred = Get-AutomationPSCredential -Name "&lt;credentialName&gt;"</em>
<em>$customerId = Get-AutomationVariable -Name "&lt;workspaceID&gt;"</em>
<em>$SharedKey = Get-AutomationVariable -Name "&lt;workspaceKey&gt;"</em>

<strong>Run the flow test script:</strong>
Create a new Azure automation PowerShell Runbook, <a target="_blank" href="https://github.com/madiasOnGit/MailFlow/blob/master/AzureAutomation_MailFlow_EWS.ps1" rel="noopener">paste the script </a>and adapt the variables to your own environment:

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/137.png" border="0" />

The script simple creates a new guid to be sent as the message subject and tracks the round trip time with a Diagnostics.Stopwatch

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/26.png" border="0" />

If the message is sent, we then wait for it to come back by searching the inbox with the previous created guid as a filter.
If we don't time out, then a "Result:Success" log will be created in the Log Analytics service:

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/34.png" border="0" />

<strong>Create a schedule in Azure Logic Apps</strong>

If you haven't play around with Logic Apps then you don't know what you're missing :)
There’s already a huge amount of triggers and actions available in the service that can help to integrate different systems and create  simple “playbooks”.

One of those triggers is a recurrence that we can configure to trigger an action of type Create Job in Azure automation:

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/44.png" border="0" />

&nbsp;

<strong>Querying the output:</strong>
After a couple a minutes, we'll be able to query entries of MailRoundTrip_CL Type ( assuming that the log type wasn’t changed in the script ).

This example plots the roundtrip time as a timechart:

<em>MailRoundTrip_CL</em>
<em>| where TimeGenerated &gt; ago(6h)</em>
<em>| extend FromLocation = case(Location_s == "", "Not Available", Location_s), Domains = split(To_s, "@")</em>
<em>| project FromLocation , RoundTripToDomain = Domains[1], TimeGenerated, Result_s, RoundTripTime_d</em>
<em>| extend test= strcat(FromLocation, " &lt;-&gt; ", RoundTripToDomain)</em>
<em>| summarize avg(RoundTripTime_d) by test, bin( TimeGenerated, 10m)</em>
<em>| render timechart</em>

And this one will get the last test result for by location:

<em>MailRoundTrip_CL</em>
<em>| where TimeGenerated &gt; ago(4h)</em>
<em>| extend FromLocation = case(Location_s == "", "Not Available", Location_s), Domains = split(To_s, "@")</em>
<em>| project FromLocation , RoundTripToDomain = Domains[1], TimeGenerated, Result_s, RoundTripTime_d </em>
<em>| summarize TestTime = arg_max(TimeGenerated, Result = Result_s) by FromLocation, tostring(RoundTripToDomain)</em>

<strong>Creating the Power BI Dashboard:</strong>
Now that the data is being created, we just need to click the Power BI query in the export options:

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/51.jpg" border="0" />

Then, open Power BI desktop, click Get Data, choose blank query, click advanced editor and paste the contents from the download file.
After authenticating, we should be able to get a dataset that can be used to create appealing visuals:

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/62.png" border="0" />

<a target="_blank" href="https://github.com/madiasOnGit/MailFlow" rel="noopener">Refer to this repo</a> ( https://github.com/madiasOnGit/MailFlow ) for the complete script.

Happy Dashboarding,
Marco]]></content:encoded>
    </item>
    <item>
      <title>Azure Resource Manager Template for an Azure Dashboard with Log Analytics Tiles</title>
      <link>https://docs.microsoft.com/archive/blogs/madias/azure-resource-manager-template-for-an-azure-dashboard-with-log-analytics-tiles</link>
      <pubDate>Mon, 11 Sep 2017 22:30:49 GMT</pubDate>
      <dc:creator><![CDATA[MarcoDias]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madias/?p=27</guid>
      <description><![CDATA[In this example I´ll be creating an ARM template with a couple of Azure Log Analytics tiles.

I...]]></description>
      <content:encoded><![CDATA[<strong>In this example I´ll be creating an ARM template with a couple of Azure Log Analytics tiles.</strong>

I wanted to create a Dashboard with some performance metrics that could be reused in different environments.

So, create a new dashboard, pin the intended tiles, "export" to an ARM template and reuse, right ? Well, the export part is a bit tricky.

<strong>First</strong>, open up the new Log Analytics query editor and pin the tiles to a new dashboard ( that should already exists as a saved dashboard in a resource group ) .

In this example I´m querying the Average CPU usage for all my agents in the last 24 hours to render as a time chart:

<em>Perf</em>
<em>| where CounterName == "% Processor Time" and TimeGenerated &gt; ago(24h) | summarize AVGCPU = avg(CounterValue) by bin(TimeGenerated, 1h), Computer</em>
<em>| render timechart</em>

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/logAnalyticsQueryEditor.png" border="0" />

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/azureDashboard.png" border="0" />

&nbsp;

<strong>Then</strong>, when you´re happy with the looks, the fun part begins…
We need to open the dashboard definition and resource explorer can give us a hand:

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/ResourceExplorer1.png" border="0" />

Navigate to the created dashboard and grab the definition to a text/ARM editor of choice.
Create a new ARM template definition with parameters for requesting the dashboard Name, Log Analytics Workspace Name and location, a variable for generating a unique name and chose "2015-08-01-preview" as the API version.

<img width="600" height="536" title="image" style="padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/09/ARMTemplate.png" border="0" />

Paste the previous grabbed dashboard from resource explorer into the resources tag and modify static values like so:
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><em>{</em></p>
<p style="margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt"><em>"name": "ComponentId",</em></p>
<p style="margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt"><em>"value": {</em></p>
<p style="margin: 0in;margin-left: .75in;font-family: Calibri;font-size: 11.0pt"><em>"SubscriptionId": "[subscription().subscriptionId]",</em></p>
<p style="margin: 0in;margin-left: .75in;font-family: Calibri;font-size: 11.0pt"><em>"ResourceGroup": "[parameters('logAnalyticsWorkspaceResourceGroup')]",</em></p>
<p style="margin: 0in;margin-left: .75in;font-family: Calibri;font-size: 11.0pt"><em>"Name": "[parameters('logAnalyticsWorkspaceName')]"</em></p>
<p style="margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt"><em>}</em></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><em>},</em></p>
...
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><em>{</em></p>
<p style="margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt"><em>"name": "DashboardId",</em></p>
<p style="margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt"><em>"value": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().Name,'/providers/Microsoft.Portal/dashboards/',variables('dashboardID'))]"</em></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><em>},</em></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">...</p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><em>{</em></p>
<p style="margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt"><em>"name": "PartId",</em></p>
<p style="margin: 0in;margin-left: .375in;font-family: Calibri;font-size: 11.0pt"><em>"value": "[concat(uniquestring(variables('dashboardID')), 'Part1')]"</em></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><em>},</em></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><strong>And that’s it!</strong></p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><a href="https://github.com/madiasOnGit/Azure.ARM.Dashboards/tree/master/KustoDashboardExample">Refer to this repo </a>( https://github.com/madiasOnGit/Azure.ARM.Dashboards/tree/master/KustoDashboardExample ) for the complete template.</p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt">Happy Dashboarding,
Marco</p>]]></content:encoded>
    </item>
  </channel>
</rss>