Skip to content

Show results of SQL query on Azure Dashboard

I like to show the result of SQL Query on a Azure Dashboard. “Should be checken food” I thought. I checked a ton of options and finally got solution working.

Solution

One way I found was by writing a custom HTTP endpoint which returns Markdown text. I then added the Markdown widget and entered the endpoints URL as the external Markdown source.

dashboard_external_markdown

This is how it looks like when my endpoint returned the string “58 Events”:

dashboard_external_markdown_widget

If you already have a AppService app or something similar you maybe like to integrate such “monitoring endpoints” in your solution. I didn’t like to to do it.

So how did implement the custom HTTP endpoint? Because I had issues with Azure Functions and query a SQL database in the past I’ve chosen Azure LogicApp to do it.

A LogicApp can be triggered on HTTP requests, can do SQL queries and can respond to HTTP requests. The down-side: LogicApps cost per execution. Not much but they cost. So its more proof-of-concept type of a solution. Read about my logic-app here…

Possible improvements:

  • Use Azure Functions instead of the LogicApp.
  • Use a web app instead of the LogicApp.
  • Log it as log-events and use Azure Monitor Workbook to query it and build a nice report (workbooks can be pinned to Azure Dashboard).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: