Monitor Azure Service Bus using PowerShell Universal Dashboard

Huzaifa Asif
Jun 8, 2018 · 2 min read

I recently came across a Tool from Poshtools called PowerShell Universal Dashboard. This tool allows you to periodically monitor anything from CPU usage to monitoring Azure namespaces which can then be rendered on various graphs.

The tool is built on PowerShell Core using kestrel and Chart.js which enables you to deploy your dashboards wherever you want from Windows to Linux.

I am going to show how simple it is to start using the Universal Dashboard for monitoring and in this example will focus on monitoring the queues on the Azure service bus namespace.


Installing the module

Open up PowerShell in admin mode and run:

Install-Module UniversalDashboard

To get a complete list of commands from this module.

get-command -module UniversalDashboard

I have already setup my azure service bus namespace with some topics and queues. I have also filled up the topic subscriptions and queues with some dummy data.

Before we continue creating our dashboard, lets first login to Azure via PowerShell.

Login-AzureRmAccount

If you have more than one subscription, make sure you are using the correct one by setting the azure context.

Set-AzureRmContext -SubscriptionName <subscription_name>

The Script

Below is the script I used to build my dashboard which will display the following information:

  • The active message count for the queue
  • The rate at which messages are being processed from the queue

Let’s start the dashboard:

Start-UDDashboard -Port 1000 -Dashboard $AzureDashboard

Go to http://localhost:1000/ in your browser to see your dashboard

information about the history.web.api queue

To view the current state of all of your dashboards

Get-UDDashboardName       Port Running
---- ---- -------
Dashboard8 1000 True

To stop the dashboard:

Get-UDDashboard | Stop-UDDashboard

Head over to this documentation to learn more about the various charts and formatting you could use for your dashboard.


Please Note:

When you first install Universal Dashboard it comes with a free trial license for PoshTools. If you feel this is a worthwhile investment for your team a license which costs roughly £74 per server and includes free updates for a year!

The ASOS Tech Blog

A collective effort from ASOS's Tech Team, driven and…

Thanks to Jon Povey and Amisha Lakhani

Huzaifa Asif

Written by

Senior Software Engineer @Asos

The ASOS Tech Blog

A collective effort from ASOS's Tech Team, driven and directed by our writers. Learn about our engineering, our culture, and anything else that's on our mind.

Huzaifa Asif

Written by

Senior Software Engineer @Asos

The ASOS Tech Blog

A collective effort from ASOS's Tech Team, driven and directed by our writers. Learn about our engineering, our culture, and anything else that's on our mind.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store