Code Monkey home page Code Monkey logo

powerbi-loganalytics-template-reports's Introduction

Power BI Log Analytics Template Reports

Power BI allows users to configure connections to Azure Log Analytics where they can retain detailed historical activity data. This repo hosts Power BI Template (.pbit) reports that you can point to your Azure Log Analytics workspaces to load data and get inisights right away!

After opening the template you will be prompted to enter your Log Analytics Workspace ID. Once it has this information and you have logged in to Azure, the report can refresh.

Here are the available templates:

  • Log Analytics for Analysis Services Engine: This report allows you to visualize the activity of datasets hosted in the Analysis Services Engine in Power BI workspaces. You can use it to identify load patterns, investigate user actions, look at query performance trends, visualize refreshes, and much more!

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Known Issues

  • SE Duration measures are currently blank. This is because Vertipaq Storage Engine events are not yet supported in the Preview.
  • If you find the report takes a very long time to refresh and appears to be stuck, try to load a shorter period of time. We have built the Power Query logic with Log analytics Query limits in mind, but it is possible you are hitting limits. Another thing to try is to go to the Regional Settings -> Locale in the template and change it to US date format. We have had reports of European customers having the report load blocked becuase of date conversion errors.

Datasets Template app goals

The goal of the Template app is to build a tool that can be used to analyze AS Engine behavior in general and to help isolate and debug specific problems in depth. You can slice any operation by using CapacityId, Workspace Name, Dataset Name, and ReportId to give you the necessary context.

The following are some examples of questions that you can answer with the Template app.

General

  • What is the engine activity by capacity and workspace?
  • What is the engine load by day or by hour?
  • What operations are taking the most CPU time or duration?
  • How does the load vary by hour of day?
  • Which users are generating load?

Query

  • Which Data Analysis Expressions (DAX) queries were issued in a particular scope?
  • Which queries are the most expensive?
  • How does a unique DAX query vary over time, and which are the worst?
  • What was the query text?
  • What were the Storage Engine or DQ queries that were generated from a DAX query?
  • How much time did the query spend in Storage Engine versus Formula Engine?
  • Did queries use aggregations and what was the performance benefit?

Refresh

  • Which refreshes are expensive?
  • Which refreshes overlap?
  • Which operations within a refresh are in parallel, and which ones take the longest time?
  • What were the different operations and suboperations within a refresh?

Others

Since the Template app contains various AS Engine events, you can customize it to answer questions related to other events such as Discover or Notification.

App data source

The Template app loads data from a single Azure Log Analytics workspace.

It doesn't matter if the Log Analytics workspace contains data from many Power BI workspaces. It also doesn't matter which level of administrator configured logging. The log schemas are exactly the same for every role, so there's only one version of the Template app. There are different levels of aggregation to accommodate a range of use cases. For more information, see Using Log Analytics in Power BI

App data model

The Template app has the following tables and relationships:

  • User
  • Query Duration Segment
  • Scenario
  • Calendar
  • Time
  • Operation
  • Suboperation - Aggregations
  • Suboperation - Query
  • Suboperation - Refresh

The following image is an entity relationship (ER) diagram.

Screenshot of the entity relationship diagram.

App parameters

The following parameters are defined in the template:

Parameter Description
Days Ago To Start Load data from the specified day to the time the call was initiated. The maximum value you can select is 30 days. However, your Premium capacity memory limits apply to this parameter. If those limits are exceeded, the Template app might fail to refresh.
Days Ago To Finish Load data up to the specified number of days ago. Use 0 for today.
Log Analytics Table Preset values corresponding to the Log Analytics source table:
- PowerBIDatasetsWorkspace
- PowerBIDatasetsTenant
Currently only PowerBIDatasetsWorkspace is supported.
Log Analytics WorkspaceId Globally unique identifier (GUID) of the Azure Log Analytics workspace containing the AS Engine data.
UTC Offset An hourly offset used to convert the data from Coordinate Universal Time (UTC) to a local time zone.
Pagination Hours This parameter is optional. It describes the time window for each log analytics call from Power BI. You only need to update this parameter if you're running into failures while fetching data due to data size exceeding Log Analytics limits.

Screenshot of the Edit Parameters dialog.

App usage

App workflow

The following diagram shows the workflow for the Template app.

Screenshot of a diagram showing the major pages of the Template app and some important available drillthroughs.

Workspace summary

This page shows engine activities and load at a workspace level, focusing on identifying interesting datasets, reports, or users. You can use this page to identify a high-level issue to analyze further by navigating or drilling through to other pages of the Template app.

Engine activities

This page provides engine load and activity trends by day and hour, with the ability to select a scenario such as Refresh Completed or Query Completed. You can drill through to the Engine activity detail page to get a look at a detailed list of each activity within the selected context.

Engine activity detail

This page is a drillthrough page showing event-level data. For example, you can list all queries that ran in a particular time range.

Dataset refreshes

This page provides a Gantt chart style view of refreshes to observe duration and parallelism. You can drill through to the dataset refresh details for more details.

Dataset refresh detail

This drillthrough page shows the operations that occurred within a single dataset refresh. You can use this view to identify the longest running operation in a refresh and to see if there are any dependencies between activities.

Query statistics

This page is an overview of query performance, highlighting typical and low performing durations and letting you see how variable each unique query is.

Query detail

This drillthrough page shows visuals such as a detailed table for the query, a table for related queries, and more. For Import tables, the page shows you the internal Vertipaq storage engine queries and durations. For DirectQuery models, the page shows you the external queries, for example T-SQL sent to a SQL Server.

Query history

This page shows you every execution of a query, provides CPU and duration stats, and provides trend visuals to see if there are any spikes.

User activities

This page shows a summary view that focuses on users, helping you identify the most active users and those users who are experiencing worse performance relative to others.

User detail

This drillthrough page provides details of the activities performed by a single user.

Error summary

This page helps identify errors and spot any error trends.

Error details

This page allows you to zoom in on a specific error by viewing the detailed event.

Navigate in the app

The Template app contains a navigation bar at top of the page to navigate to the expected page.

Screenshot of the navigation bar for the Template app.

Also, there's a back button on the top-left corner to go back to the previous page and an info icon that provides information about the page.

Screenshot of the navigation bar highlighting the back and information buttons.

Filter and understand the current context

Every page has a filter button below the navigation bar that you can select to open the pop-up filter panel and make selections.

Screenshot highlighting the filter button at the top of the page on the Template app.

The current values of the filters are displayed in the smart narrative next to the filters button. You can clear all the slicers by using the Clear button on the top-left corner or close the window by using the X button in the top-right corner.

Screenshot of the popup dialog for the filter.

Screenshot of smart narrative next to the filter button.

If more than one value is selected for a filter, the smart narrative displays one of the values followed by "and more".

Datasets Template App pages

Page: Workspace summary

This page is targeted at a workspace administrator and shows activities and statistics related to datasets and queries. It also identifies top reports by load, details popular datasets by operations or users, and allows drillthrough to various pages to get further details.

Screenshot of the Workspace summary page in the Template app.

The following table lists the visuals displayed on the workspace summary page according to their location on the page.

Left Right
Top N reports with high CPU Usage - A bar chart shows Top N reports with high aggregate CPU usage by default.
Top N users with high CPU Usage - A bar chart shows Top N users with high aggregate CPU usage by default.
Top 10 datasets by query executions - A table shows 10 datasets by query executions in descending order.
Reports by slow queries - A scatter chart shows the query performance distribution.
Dataset refresh success versus failures - A column chart shows number of successful versus failed dataset refreshes per day. Queries by duration - A column chart shows the count of queries by duration band.
Queries by date and duration segments - A clustered column chart shows query count by query duration distribution per day.

Page: Engine activities (also a drillthrough)

This page provides a trend overview of AS Engine activities by day and by hour. It allows you to identify peaks or outliers on a day and then see how that activity breaks down by hour when you cross-highlight by selecting a day.

Screenshot of the Engine activities page in the Template app.

The following table lists the visuals displayed on the engine activities page according to their location on the page.

Left Right
CPU time (s) and count of operation by date and scenario - Columns show the total CPU time taken per day by each operation type. Engine activity details - A table is represented in stepped layout as a hierarchy across capacities, workspaces, datasets, and reports, showing a count of operations, CPU time, and durations.
CPU time (s) and count of operations by hour and scenario - Columns show the total CPU time taken per hour by each operation type.

Drillthrough page: Engine activity details

This page allows you to focus on a narrow time range and see the individual activities at a granular level of detail. The following example shows all the DAX queries that were executed in a minute, sorted by longest duration.

Screenshot of the Engine Activity Details drillthrough.

The following table lists the visuals displayed on the engine activity details page according to their location on the page.

Visuals
CPU time (s) and count of operations by scenarios over period of time - A column chart shows the total CPU time taken by each scenario per day.
Operations - A table shows the detail of operations.

Page: Dataset refreshes (also a drillthrough)

This page provides an overview of dataset refreshes occurring over a selected period. It allows you to identify long running refreshes and visualize which ones are happening in parallel. This page allows you to select any data refresh and drill through to a page called Dataset refresh detail.

Screenshot of the Dataset refreshes page in the Template app.

The following table lists the visuals displayed on the dataset refreshes page according to their location on the page.

Visuals
Duration (ms) by refresh and start date/time - A column chart shows the refresh duration for datasets over a period of time.
Dataset refresh timeline - A timeline visual shows refreshes per dataset over a period of time.
Dataset refresh operations - A table shows details for the refresh operations.

Drillthrough page: Dataset refresh detail

This page allows you to visualize a single dataset refresh in detail. You can see all the internal operations that the engine performed such as executing queries and compressing data. It allows you to determine the longest running operations, which are parallel, and which might have dependencies.

Screenshot of the Dataset refresh detail drillthrough.

The following table lists the visuals displayed on the dataset refresh detail page according to their location on the page.

Visuals
Data refresh suboperation timeline by object and event subclass - A timeline of each corresponding dataset refresh suboperation is displayed.
Dataset refresh suboperations - A table shows details of the suboperations that the engine performs for each refresh.

Page: Query statistics (also a drillthrough)

This page focuses on queries in bulk. The goal is to identify which queries are common and which queries have high variability. The Template app provides percentiles and deviations to give you an idea of both typical and more extreme measurements.

Any query can be drilled through to a page called Query detail to see details about its execution. Among other pieces of information, you can see the internal Vertipaq Queries or external DirectQuery text and duration depending on the model type.

You can also drill through to a page called Query history that shows you all the execution of that query over a period, and its performance trend.

Screenshot of the Query statistics page in the Template app.

The following table lists the visuals displayed on the query statistics page according to their location on the page.

Left Right
Query success versus failures count - A Line chart shows the daily trend of query completions and failures. Queries by aggregation usage - Shows how many queries used aggregations by using both count and percentage.
Queries by date and segments - A clustered column chart shows query count by query duration segment.
Top N queries by CPU variability - A table is represented in stepped layout as a hierarchy across capacities, workspaces, datasets, reports, and queries showing the count of operations, CPU time standard deviation, and more.
Top N queries by duration P50 - A table is represented in stepped layout as a hierarchy across capacities, workspaces, datasets, reports, and queries showing the count of operations, duration standard deviation, and more.

Drillthrough page: Query detail

This page provides a detailed look at a single execution of a DAX query. Depending on whether the query was for an Import or DirectQuery model, you might either see the internal Vertipaq Storage Engine queries or the external DQ source queries (for example, T-SQL for SQL Server). It also identifies which aggregations were used, if any.

Screenshot of the Query detail drillthrough.

The following table lists the visuals displayed on the query detail page according to their location on the page.

Left Right
Query executions - A table lists each query executed, with performance details. Event Text - Table shows the complete event text for queries executed.
CPU time (s) by date and time - A line chart shows total CPU time taken in seconds depending on whether aggregation is used or not over a time period.
Duration (ms) by date and time - A line chart shows total duration taken in seconds depending on whether aggregation is used or not over a time period.

The cards on the right display the number of users who ran this query and the application that was used to run this query.

Drillthrough page: Query history

This page is a historical view of a single unique query. It shows metrics over time and introduces the Storage Engine and Formula Engine time. You can use it to determine how consistent a query is over time and identify if issues are isolated to particular users or time frames.

Screenshot of the Query history drillthrough.

The following table lists the visuals displayed on the query history page according to their location on the page.

Left Right
Query details - Lists each query executed with performance details.
CPU time (s) by date and time - A line chart shows total CPU time taken over seconds depending on whether aggregation is used or not over a time period. Event text - A table shows the complete complete event text for queries.

The cards on the right display the total number of executions of a given query, the execution times in ms, and the aggregation utilization percentage.

Page: User activities

This page gives an overview of the user activities across the workspace. It also gives information about the most active users for a period by capturing their CPU time usage, query usage, and operations performed.

Screenshot of the User activities page in the Template app.

The following table lists the visuals displayed on the user activities page according to their location on the page.

Left Right
Top N users by operation - Shows the top 5 users who performed the most operations against the dataset.
Top N users by query execution - Shows the top 5 users who ran the most queries against the dataset.
Queries versus CPU time by users - Compares query count versus Avg CPU time for each unique query text.
Daily user and operation count - Columns show the count of users, and the line shows operation count, both by day. Hourly user and operation count - A column chart represents the users as columns and operation count over the time as hourly trend for users.
User details - Shows a count of actions and artifacts per user.

The cards on the right display user count and operations count.

Drillthrough page: User detail

This page provides a detailed historical view of activities for a single user.

Screenshot of the User detail drillthrough.

The following table lists the visuals displayed on the user detail page according to their location on the page.

Left Right
CPU time (s), count of operations and users by date - Columns show the total CPU time taken per day by each operation type. The line shows the count of operations for a day. CPU time (s), count of operations and earliest date by hour and scenario - This hourly breakdown complements the daily version of the chart.
User details - A table shows the user activities sorted by timestamp.

Page: Error summary

This page provides an overview of errors or failed executions over time, allowing you to view individual operations that reported an error status.

Screenshot of the Error summary page in the Template app.

The following table lists the visuals displayed on the error summary page according to their location on the page.

Left Right
Total query failed and query failure rate by date - Columns show the total failed queries. Line values represent the query failure rate.
Total failed refreshes and refresh - failure rate by date - Columns show the total failed dataset refreshes. Line values represent the dataset refresh failure rate. The visual shows both by day.
Failure details - A table shows the details of failure with respect to the total values.
Error details - Lists errors reported by datasets for any operation.

The cards on the right display overall operations count, query failure count, refresh failure count, and user count.

Drillthrough page: Error page detail

This page provides details of errors generated by the engine. It also provides the information about failed operations due to query failures.

Screenshot of the Error page drillthrough.

The following table lists the visuals displayed on the error detail page according to their location on the page.

Visuals
CPU time (ms) total and count of operations by date, hour and scenario - Line and column charts show the trends for the scenario on the day, distributed by CPU time taken for each scenario in stacked column series.
Operations - A table lists all operations performed on the dataset.

Help

This page provides a help summary of different features throughout the Template app. It also has support links that can be used for any support assistance.

Screenshot of the Help page that's in the Template app.

Each visual in the Template app has a ? icon. Select this icon to learn more about the visual.

Considerations and limitations

  • Log Analytics Query Limits

    • Kusto has limits in terms of the number of records returned and the overall size of the data based on the query. The Template app has been built to work around these limits by pulling data in sequential chunks. However, you might still exceed these limits, resulting in a refresh failure in the Template app. For more information, see Query Limits.

    • If the Template app refresh fails due to the previously mentioned data limits, you can configure the Pagination Hours parameter. Setting a lower value here lowers the amount of data retrieved from Log Analytics per call by increasing the number of calls.

  • The following events are intentionally excluded from Log Analytics during the Preview:

    • ProgressReportCurrent
    • ProgressReportBegin
    • ProgressReportError
    • VertipaqSEQueryBegin
    • VertipaqSEQueryEnd

    Due to this design decision, storage engine subqueries aren't visible for now on the Query detail page.

powerbi-loganalytics-template-reports's People

Contributors

bhavik-msft avatar bstar92 avatar maverick3107 avatar microsoft-github-operations[bot] avatar microsoftopensource avatar ruiromano avatar saurabhr14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powerbi-loganalytics-template-reports's Issues

Add Report Names support

Would be great to have the report names instead of the GUIDs.
Maybe this could be obtained from Power BI API and then joined together?

Metrics discrepancy.

The metrics created for this code are different vs the metrics from Usage Metrics Report provided for Power BI tool.
For example many actions IDs are lost, so we are under reporting metrics.

Logging for Analysis Service

I understand this report is made for powerBI. But when setting up LogAnalysis in Azure for Azure Analysis Service, would it be possible to use (some) of the report for analyzing processing and queries as well? I am not at all familiar with Kusto, so I am hoping to get some help on what queries to tweak?

Or as an alternative, is there somewhere a report in PBI made for analyzing Azure Analysis Service Logs as well?

Thank you for you help!

1 potential issue and 2 questions

Hi dears contributors

Firstly , great thanks for this useful APP, all my PBI administrator around premium troubleshooting colleagues like

Perhaps a small issue : It is missing scenario = "query completed" on Query Statistics page whole page filters

2 questions :

  1. What is the meaning of all these operations you display , please
    I understand queryEnd , CommandEnd (type refresh) , error ... I don't know DiscoverEnd ;>)

operation | operation detail | scenario name

DiscoverEnd | DiscoverKeywords | Discover completed
DiscoverEnd | DiscoverPowerBIDatasources | Discover completed
DiscoverEnd | DiscoverProperties | Discover completed
DiscoverEnd | DiscoverSchemaRowsets | Discover completed
DiscoverEnd | DiscoverXmlMetadata | Discover completed
DiscoverEnd | SchemaCatalogs | Discover completed
DiscoverEnd | SchemaCubes | Discover completed
DiscoverEnd | SchemaFunctions | Discover completed
DiscoverEnd | TabularSchemaAlternateOfDefinitions | Discover completed
DiscoverEnd | TabularSchemaAnnotations | Discover completed
DiscoverEnd | TabularSchemaAttributeHierarchies | Discover completed
DiscoverEnd | TabularSchemaCalculationGroups | Discover completed
DiscoverEnd | TabularSchemaCalculationItems | Discover completed
DiscoverEnd | TabularSchemaColumnPermissions | Discover completed
DiscoverEnd | TabularSchemaColumns | Discover completed
DiscoverEnd | TabularSchemaCultures | Discover completed
etc ...

  1. There are some difference between logs analytics data and App Fabric metrics underlying table KPIs
    Perhaps it's normal because telemetry systems are not the same

--Small differences around SUM(CU) aggregations
Perhaps it' normal due to (X reasons - logs method etc ..)
Thanks a lot if you have hear something on the subject

--Big differences regarding operation counts

Support for PowerBIDatasetsTenant

The endpoint for PowerBIDatasetsTenant has been available in Log Analytics for a while. Is there a roadmap for when data will be available here and whether this report will be updated to support?

restricted to use

i try to open the template, it says "file is restricted with sensitivity label"

Error 400: Bad Request

Hello - I am attempting to use this Power BI PBIT file. When I enter my Log Analytics Workspace Id and attempt to load data, I get a Error 400: Bad Request error. This is occurring on the Suboperation - Query step

When I paste the URL it is attempting to execute in my browser, I see this:

{"error":{"message":"Valid authentication was not provided","code":"AuthorizationRequiredError","correlationId":"8055813b-9e2a-4a5c-b316-33a2394294bb"}}

I am never prompted for any sort of authentication. How do I get around this?

Measure User DCount

The measure "User DCount" should be DISTINCTCOUNT (Operation[Executing User] ).

Unable to Analyze in Excel

I am a workspace admin so would expect to be able to use Analyze in Excel and Export To Excel with a live connection to the dataset created by this template since I have the build permission. However the only thing I'm able to do is export summarized data to CSV. Is this intentional? is it documented anywhere?

Analyze in Excel is greyed out:
image

When I Export To Excel with a live connection and authenticate, i see this message:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.