Mauchy81 / pbila

Power BI Logs Analytics Starter Kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Power BI Log Analytics Starter Kit

Power BI Logo

Power BI Log Analytics is a free tool that helps you fetch the right insigth of your Power BI usage. As a starter Kit, the main aim is to show you what kind of information you can get using the Power BI API's and how you can transform it to insights.

To do, i'm using the Power BI RESP API (https://docs.microsoft.com/en-us/rest/api/power-bi/) especially the ADMIN API.

  • Connect-PowerBIServiceAccount* : Log in the Power BI service (https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.profile/connect-powerbiserviceaccount?view=powerbi-ps) you need to install MicrosoftPowerBIMgmt Powershell module
  • Get Activity Events : Fetching the activity logs (https://docs.microsoft.com/en-us/rest/api/power-bi/admin/getactivityevents)
  • Groups GetGroupsAsAdmin : Returns a list of workspaces for the organization with enxtension of users,reports,dashboards,datasets,dataflows excluding the inactive and the personal workspaces (https://docs.microsoft.com/en-us/rest/api/power-bi/admin/groups_getgroupsasadmin)
  • Get Capacities As Admin : Returns a list of capacities for the organization. (https://docs.microsoft.com/en-us/rest/api/power-bi/admin/getcapacitiesasadmin)
  • Get Refreshables : Returns a list of refreshables for the organization (https://docs.microsoft.com/en-us/rest/api/power-bi/admin/getrefreshables)
  • Get Gateways : Returns a list of gateways for the organization (No documentation for this V2.0 API)
  • Datasets GetDatasourcesAsAdmin : Returns a list of datasources for the specified dataset. (https://docs.microsoft.com/en-us/rest/api/power-bi/admin/datasets_getdatasourcesasadmin)

Feel free to modify the script or the report to fit your needs.

Prerequisites

  • Power BI Administrator role
  • Create the folder to be used in the ($BasePath) to receive the files
  • Update ($BasePath) the parameters setting of the report Parameters
  • Install (MicrosoftPowerBIMgmt) Powershell module to use the (Connect-PowerBIServiceAccount) API
  • Data sources credential configuration : For this report, i'm using two datasources as you can see in my lineage diagrame.
    • Web : I'm using the url (https://www.microsoft.com/en-us/download/details.aspx?id=53127) using the Web connector to fetch the latest Gateway version and the published date, with anonymous credentials
    • Data : The datasource to get acces to the files, with your own credentials Gateways-Settings
  • Report developped with Power BI Desktop Version: 2.90.542.0 64-bit (February 2021)

Limitations

  • In the API call (GetGroupsAsAdmin) you must specify a limitation parametre of 5000 maximum ($top={$top}). If you have more than 5K Workspaces you'll be stuck ! In case you have several Premium capacity, then you can create a loop using each capacity as a filter.
  • The API call (Refreshables) will only fetch the data of the last refresh. In case your dataset refreshes several times, you'll only get the last status.
  • There is an API (Get Refresh History) that allows you to get the history refresh, but you need to be part of each workspace.
  • There is No API to extract the information about the APP at the organisation level.

Versions

  • 1.0.0

Documentations

Activity

Activities

  • Activity by user : Number of action performed by a user
  • Activity by Category : Number of action grouped by category
  • Activity by Domain : Number of action grouped by domain performed by a user
  • Activity by Capacity : Number of action grouped by capacity performed by a user
  • Activity By Date : Number of action grouped by date performed by a user

User Activities

User-Activities

  • User per Workspace : Number of distinct user active in this workspace
  • Activity per users : Number of action grouped by category performed by a user
  • User by domain : Number of distinct user active by domain
  • User by Capacity : Number of distinct user active by capacity
  • User By Date : Number of distinct user active by date

Activities details

Activity-Details

  • Activity matrice details : breakdown details of all actions

Inventory & Roles

Inventory

  • Inventory by Capacity, Worksapce, User & Access Right : Listing of Capacity, Workspace, user and access right for each one
  • Users by Access Right repartition : Grouping Access Right per role
  • Users by Capacity Name and Access Right : Grouping Access Right per Capacity

Workspaces Details

Inventory-Detail

  • Inventory by Capacity, Worksapce, User & Access Right : Matrice breakdown
  • Inventory by Capacity, Worksapce, User & Access Right : Neuronal graph

Inventory Evolution

Inventory-Evolution

  • Current Status : Current inventory status
  • D-1 Status : Day -1 inventory status minus the current inventory
  • Inventory History : Number of artefact by date

Refresh Schedule

Refreshables

  • Scheduled Refreshes Per User for a Week : Number of refreshes per user for a week
  • Refreshes per Capacity : Number of refreshes per premium capacity for a week
  • Refreshes per Dataset : Number of refreshes per dataset for a week
  • Average Refreshes duration per dataset : Average refresh duration per dataset
  • Refreshes Schedule timeline : Timeline matrice of sheduled refreshes for a week
  • Ratio Usage Activity / Number of Refresh per dataset : Ratio between usage and refresh for a dataset

Refresh Status

Refreshables-Status

  • Refreshes by Capacity : last refreshe status per dataset
  • Refresh Status timeline : Timeline status (Daily) for refreshes
  • Refreshes Details : Matrice breakdown

Gateways

Gateways

  • Latest Version : The latest verison available of the Data Gateway
  • Date Pulished : Date of the availbility of the latest version of the Data Gateway
  • Gateways Type : Repartition per gateway type
  • Active Gateways : Repartion of active & inactive Gateways
  • Customer Connector : Availabilty of customer connector
  • Uptodate version : Repartion of uptodate version gateways
  • Gateways per user & per type : Number of distinct gateway per user & by type
  • Gateways Version & Update Status : Number of distinct gateway version & Update Status

Datasources

Datasources

  • Datasources Type : Number of distinct type of datasources
  • Datasources per user : Number of distinct datasources per user
  • Datasources Details : Matrice breakdown

Contact

For any suggestions or remarks, feel free to contact me on linkedIn : https://www.linkedin.com/in/kasdalinassim/

;)

About

Power BI Logs Analytics Starter Kit


Languages

Language:PowerShell 100.0%