Log Analytics Workspace
  • 12 Feb 2024
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Log Analytics Workspace

  • Dark
    Light
  • PDF

Article Summary

Introduction

Log Analytics Workspace is a logical storage unit in Azure that stores all log data from Azure Monitors. Azure Log Analytics Workspace simplifies the management of log data collected from various data sources such as Azure Virtual Machines.

Azure log analytics can be used to query and retrieve data from multiple monitor logs that meet certain criteria to provide better insights of the data.

Queries

The Queries section in the Log Analytics Workspace resource offers a number of Query-related operations.

queries.PNG

Users can write a query in the Query field to generate query data that meets their needs.

The Query data can be viewed in any of the available formats:

  • table
  • line
  • bar
  • column
  • donut
  • area

The Query library option in the Execute Queries section allows users to access the preset queries from the Azure portal directly in Turbo360. Users can easily add any of those queries to their Saved queries by using the Save icon found on each query.

chart view.gif

The Saved queries option in the Execute Queries section allows users to access all the saved queries and easily generate Query data. Users can also edit their saved queries and update the favorite query.

saved query.gif

A Favorite query is one that is available by default in the Execute Queries section. A query can be marked as favorite by editing any one of the saved queries or by saving a query.

favorite query.gif

Time range

A time range filter can be applied to the queries to retrieve the subset of required data. The time can be provided in the query or by choosing from the time range filter.

time range query.gif

Resource Dashboard

A default resource dashboard is available for Log Analytics Workspace resources in the Overview section, allowing for enhanced data visualization and tracking of real-time data.

Log Analytics Workspace.png

Users are provided with the following pre-defined Dashboard widgets, which can be customized to meet their specific needs.

1. Total Rx Errors
2. Total Tx Errors
3. Total Collisions
4. Average Interrupt Time
5. Heartbeat
6. Event

Query Widgets

Queries can also be used to generate real-time data in Dashboard widgets to provide a more personalized user experience.

Query widgets can be added to both the Business Application and the Resource Dashboard when the Data source value for the Log Analytic Workspace resource is set to Query in widget configuration.

In the query field, type a valid query and hit the Run button. Selecting the appropriate data label from the Y-axis dropdown and the X-axis checkboxes allows users to customize the values that appear on the x and y-axis.

dashboard widget.PNG

Query widgets do not display time settings information in their tooltip because the data is generated only for the desired query, regardless of time settings configuration.

Count charts do not support Query data sources.

Monitoring

  1. Navigate to Log Analytics Workspace -> Monitoring to configure monitoring rules.
  2. You can configure the monitoring metrics under the Metrics and Properties tab and query rules under the Queries tab.

Metric monitoring

  1. Switch to the Metrics and properties tab to configure rules for metric monitoring
  2. Select the necessary monitoring metrics and configure the threshold values
  3. Click Save

Monitoring rules will be saved for Log Analytics, and the monitoring state for the metrics will be reflected after every monitoring cycle.

log monitoring.PNG

Query monitoring

  1. Switch to the Queries tab to configure rules for query monitoring
  2. Click Add
  3. Enter a name to the query rule
  4. You can enter the desired query by choosing Enter query (or) select one from the list of saved queries by choosing Open from saved queries
  5. Select the preferred time range
  6. Click Execute to run the query
  7. Select the required query columns and configure the threshold values
  8. Click Save

Query monitoring will be initiated once the rules are saved, and the query monitoring state will be reflected after every monitoring cycle.

query monitoring.gif

Points to remember:
  1. The metric thresholds can also include any metric name as its value.
  2. Log Analytics allow both scalar and non-scalar queries for query monitoring.

Was this article helpful?

What's Next