So the other day I wanted to Monitor some activities in my Azure Notification Hubs, well of course you get the “Monitor” tab in the ANH panel online, but it’s hard to get into details with it as it only shows numerical statistics. I wanted to be more specifically look into the Device registrations, platform types, available Tags usage, registration expiration and so on.
Then quite surprisingly I came through this tool which was sitting right inside Visual Studio this whole time, which I hadn’t noticed before. Behold, the “Azure Notification Hubs Diagnostics” tool in Visual Studio. (Well actually Microsoft hasn’t given it a proper name though😛 , but I wish if they did…)
(Sorry I had to blacken out the sensible information😉 )
Just as a side-note I actually wish if Microsoft included these features in the online Azure Notification Hub Monitoring panel as well.
I’m really surprised why I haven’t noticed about this tool this whole time working with Azure PNH ! Therefore I thought of writing a small article about this awesome tool, if by chance any of you fellow awesome developers had missed on this tool…🙂
Yes its pretty useful…
With the use of this tool you could do easily accomplish all the following requirements,
- Easily Send Test/Debug Push Notifications (A huge variety of devices through respective PNS)
- View all the Device Registrations along with their Platform types, Tags, PNS Identifiers, Registration IDs, and Expiration Days.
- View all the above info in real time as it updates
- Edit any Tags of the registered devices
- Remove any Registrations
- Sort through your specific Tags of the registered Devices
- View overall registration stats of each platform
- and many more uses if you are smart enough…😉
Yep it’s sitting right here…
Simply go to your Sever Explorer Panel -> Sign into your Azure Account (click on Connect to Microsoft Azure Subscription) -> expand Notification Hubs -> choose your desired Notification Hub -> Right Click -> Diagnose !
It will open up the Azure NH diagnostics tool, and let the fun begin…😉
Sending Test/Debug Push Notifications…
When you open up the Diagnostics, by default it opens up the Test/Debug Push Notification Panel as follows.
As I have highlighted above, this option beings some very useful features. You could include the tags you need to include in your test push notification messages easily or if you want to send without tags, you could keep the Broadcast option.
Next you will be surprised that there is a long list of mobile platforms you could choose to send the test notification as shown below.
Best yet it also by default generates the sample body, and you just have to insert the required parameters and values, and hit send.
Let’s say if you wanted Widows Phone – Toast type notification ? No problem !
oh how about Apple iPhone type notification ? Here you go…
Likewise, it is super easy to send test push notifications right from here.
Not only sending. but also viewing their results could be done in a very specific manner, which devices received them, any errors occurred and so on.😉
Viewing Device Registrations and other Stats…
This awesome tiny tool also allows you to view all of the Device Registrations along with the following very useful information.
- Registration Type
- PNS Identifier
- Registration ID
- Expiration Date
Now the above information may seem quite preliminary, but still when it comes for serious monitoring and debugging those are very useful.
Simply go to the “Device Registrations” tab to navigate to this section and start playing…
Now we all know how much we use tags along with our Azure Notifications, which is an incredible feature that allows us to send targeted push notifications to groups or individual devices. And guess what ? this tool allows you to easily search and filter through any available tags and view those registration information.
Also you can easily sort through the above listed information columns (Platform, Registration Type, Tags, etc) by acceding or descending order as you wish, which makes it really easy to monitor and debug.
What if you ever wanted to Edit or Remove some registrations or their data in case of an emergency ? Yep you can easily do that from this tool.
Yep do you see that tiny set of controls in the top left side of the panel ? It allows you to easily,
- Edit any available Tags
- Delete any selected Registrations
- Refresh the Registrations in real time
which are very much useful when monitoring and debugging push notification processes.😉
Finally another feature this brings is the overall registration statistics of any given platform, which is useful but not very informative though as much as the “Monitor” tab in the online Azure NH Console.
There you go, if you haven’t yet noticed about this useful tool, head in right now and give it a try. I grantee you it will come very handy in cases of monitoring and debugging you push notification related executions…😉
I still wish if Microsoft had made all the above features available in the online Azure Hub Monitoring section, which I sincerely hope they would do someday.
The above mentioned features may not seem to be advance enough, but still they become very handy and useful and if you are smart enough you could use this for many more other purposes..😀
Hope this was helpful for any of your fellow awesome developers out there…🙂
CHEERS ! Stay Awesome ! ^_^
UPDATE 26/10/2015 :
One of our readers @milenppavlov has suggested another great tool for even more detailed diagnostics for Azure Notification Hub. And yes I agree with him, it seem to be a very useful tool. So if any of you are looking for more specific diagnostics try his recommendation here. https://code.msdn.microsoft.com/windowsapps/Service-Bus-Explorer-f2abca5a