Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Azure Architect Technologies: Exam Guide AZ-300

You're reading from   Microsoft Azure Architect Technologies: Exam Guide AZ-300 A guide to preparing for the AZ-300 Microsoft Azure Architect Technologies certification exam

Arrow left icon
Product type Paperback
Published in Jan 2020
Publisher Packt
ISBN-13 9781838553531
Length 540 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Sjoukje Zaal Sjoukje Zaal
Author Profile Icon Sjoukje Zaal
Sjoukje Zaal
Sjoukje Zaal Sjoukje Zaal
Author Profile Icon Sjoukje Zaal
Sjoukje Zaal
Arrow right icon
View More author details
Toc

Table of Contents (30) Chapters Close

Preface 1. Section 1: Deploying and Configuring Infrastructure
2. Analyzing Resource Utilization and Consumption FREE CHAPTER 3. Creating and Configuring Storage Accounts 4. Implementing and Managing Virtual Machines 5. Implementing and Managing Virtual Networking 6. Creating Connectivity between Virtual Networks 7. Managing Azure Active Directory (Azure AD) 8. Implementing and Managing Hybrid Identities 9. Section 2: Implementing Workloads and Security
10. Migrating Servers to Azure 11. Configuring Serverless Computing 12. Implementing Application Load Balancing 13. Integrating On-Premises Networks with Azure Virtual Network 14. Managing Role-Based Access Control (RBAC) 15. Implementing Multi-Factor Authentication (MFA) 16. Section 3: Creating and Deploying Apps
17. Creating Web Apps by Using PaaS 18. Designing and Developing Apps That Run in Containers 19. Section 4: Implementing Authentication and Secure Data
20. Implementing Authentication 21. Implementing Secure Data Solutions 22. Section 5: Developing for the Cloud and for Azure Storage
23. Developing Solutions That Use Cosmos DB Storage 24. Developing Solutions That Use a Relational Database 25. Message-Based Integration Architecture and Autoscaling 26. Mock Questions
27. Mock Answers
28. Assessments 29. Another Book You May Enjoy

Utilizing log search query functions

Azure Monitor is now integrated with the features and capabilities that Log Analytics was offering. This also includes creating search queries across the different logs and metrics by using the Kusto query language.

To retrieve any type of data from Azure Monitor, a query is required. Whether you are configuring an alert rule, analyzing data in the Azure portal, retrieving data using the Azure Monitor Logs API, or being notified of a particular condition, a query is used.

The following list provides an overview of all of the different ways queries are used by Azure Monitor:

  • Portal: From the Azure portal, interactive analysis of log data can be performed. In there, you can create and edit queries and analyze the results in a variety of formats and visualizations.
  • Dashboards: The results of a query can be pinned to a dashboard. This way, results can be visualized and shared with other users.
  • Views: By using the View Designer in Azure Monitor, you can create custom views of your data. This data is provided by queries as well.
  • Alert rules: Alert rules are also made up of queries.
  • Export: Exports of data to Excel or Power BI are created with queries. The query defines the data to export.
  • Azure Monitor Logs API: The Azure Monitor Logs API allows any REST API client to retrieve log data from the workspace. The API request includes a query to retrieve the data.
  • PowerShell: You can run a PowerShell script from a command line or an Azure Automation runbook that uses Get-AzOperationalInsightsSearchResults to retrieve log data from Azure Monitor. You need to create a query for this cmdlet to retrieve the data.

In the following section, we are going to create some queries to retrieve data from the logs in Azure Monitor.

Querying logs in Azure Monitor

To query logs in Azure Monitor, perform the following steps:

  1. Navigate to the Azure portal by opening https://portal.azure.com.
  2. In the left-hand menu, select Monitor to open the Azure Monitor overview blade. Under Insights, select More. This will open the Log Analytics workspace that we created in the previous step.
  1. On the overview page, click on Logs in the top menu. This will open the Azure Monitor query editor:
Azure Monitor query editor
  1. Here, you can select some default queries. They are displayed at the bottom part of the screen. There are queries for retrieving unavailable computers, the last heartbeat of a computer, and much more. Add the following queries to the query editor window to retrieve data:
    • This query will retrieve the top 10 computers with the most error events over the last day:
Event | where (EventLevelName == "Error") | where (TimeGenerated > ago(1days)) | summarize ErrorCount = count() by Computer | top 10 by ErrorCount desc
    • This query will create a line chart with the processor utilization for each computer from the last week:
Perf | where ObjectName == "Processor" and CounterName == "% Processor Time" | where TimeGenerated between (startofweek(ago(7d)) .. endofweek(ago(7d)) ) | summarize avg(CounterValue) by Computer, bin(TimeGenerated, 5min) | render timechart 
A detailed overview and tutorial on how to get started with the Kusto query language are beyond the scope of this book. If you want to find out more about this query language, you can refer to https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/get-started-queries.
You have been reading a chapter from
Microsoft Azure Architect Technologies: Exam Guide AZ-300
Published in: Jan 2020
Publisher: Packt
ISBN-13: 9781838553531
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image