This article is actually the continuation of my previous article where we saw how to call Power BI API's with in Power BI itself with some Powershell scripts, new API , M-queries and Automation. This is the second part where I'll explain how to create a report out of it and configure gateways & alerts and manage the alerts with the help of PowerPlatforms such as Microsoft Flow. As usual through out this article also I'll tell you lots of Tips & Tricks
Let's recap the architecture here
We already have our data which we created from the previous article with that we are going to create some cool reports to manage and administrate the gateways. Here I've created 4 main reports but you can explore much with the data we already have.
Gateway Clustering Monitoring Report
This is monitoring report whic will tell the summary of how many gateways are Online/Offline. Here I've used the below filters and charts
Image Slicer which will help you to filter Active and InActive gateways
Environment Filter to filterout Production and Non-Production Gateways
Cards to show to the Exact no of Active and InActive Gateways.
Pie-Chart for the summary.
Table to find the Gateway details such as Name ,Environment,MachineName and other details for the Gateways
Gateway Cluster Report
This Report will basically tell the details of the Clusters and Gateways installed totally.
Clusters : A group of gateway(s) installed on different machine for high- availability and load balancing
Gateway: A individual on-premises gateway installed on a single machine
If you note the report I've used hierachy to enable the drill down to find how many gateways are configured for a particular cluster.
Gateway Report By Version
This report give you summary of what are the different versions of gateway currently being installed.
Now we are created our reports, It's time to publish our reports to our workspace.
Configuring Gateway for our Report
Remeber that we have used 3 different sources
1. A Text File
2. Gateways Cluster REST API
3. Gateway REST API
In order to refresh our report we need a gateway, because our text file is located in the Server.So let's configure the gateway now.
Tricks: If you thought of skiping the the other 2 data source as those API (no need gateway to communicate) then you probabily wrong. In order to refresh your report you need to add the other 2 data source with Skip Test
By doing this will we are adding a dummy sources so that we can able to refresh our reports in PowerBI service.Actually we are going to provide the Bearer Token dyamically from our Text document. So we don't need to really care about this dummy source
Now we can map the gateway to our dataset after that we are good to Refresh we can also configure the scheduled refresh
Hurray we have successfully completed our Report creation ,publishing and configured gateway for scheduled refresh.
Now It's time to setup the alerts .For that we need to Pin our Gateway off-line card/tile to our Dashboard.
From the Dashboard Three Dots- > ManagerAlerts
Create an Alert when the Threashold Reach above 0, which means any on of the gateway went offline
Unfortunately only you can able to receive this alert. But with the help of Microsoft flow we can send these alerts to others also, let see how we can do that.
Configure PowerBI Alerts in Microsoft Flows
Login to flow.microsoft.com and from there you can choose the exsiting template called Trigger a flow with PowerBI Data Driven Alert
From there choose the alerts which you created from the previous step
Now Add the Email Action to sent the Email to the team
Finally Add the Teams action to Post a message to the Teams Channel
Let's Test this whether we are able to get the alerts
Wow, Is that Cool ! We have completed all our task successfully now
In this series of article I just showed you how we can able to configure and administrate PowerBI on-premises Gateway by using PowerBI Gateway API's. This is not only for Gateway API. You can call any PowerBI API's to manage all our PowerBI components with-in PowerBI itself. You also learned how to manage the alerts produced from PowerBI to sent across Microsoft Teams, Outlooks with the help of Flow.