Create SCOM Dashboard for SharePoint in Visio

This week I created a DashBoard for SCOM in Visio to present it on a SharePoint site. Normally you could use the Visio 2010 Addin for SystemCenter – Operations Manager. But this addin has some special prerequisites for the presentation on the SharePoint site, like installing SCOM components and special configurations on the SharePoint Farm. Also it has the limitation, that it can only present monitor states, and can’t present rule values (for example: disk usage).

So I created my own solution, which I will describe here. An overview to the steps:

  • create an AD user with read permission to the SCOM database
  • create an SQL user with read permission to the SCOM database
  • create an new SQL view
  • create unattended service account in SharePoint’s Secure Store Service
  • create a Visio file and add an external data connection
  • add data graphics to shape

create user accounts

First we need to create the user accounts and set permissions for the SCOM DB. For the development we will need two accounts:

  • one account will be needed for the development of the Visio file. this should be an SQL internal account. After publishing the created Visio file to the SharePoint site, this account could be deleted / deactivated.
  • the other account will be needed to access the SCOM DB from the SharePoint. it should be an Active Directory account and will be used later as an unattended service account in SharePoint’s Secure Store Service.

it’s okay, when you give both accounts only datareader access to the SCOM database.

create the SQL view

we create a new SQL view with this SQL code:

if you use only the lines 1-41, the SQL query will show all monitored entities, which could be several thousand rows depending on the size of your Environment. to prevent long loading times, we will filter it. in my example, i filter it by the desired entityID, but of course, you can filter it by other properties.

The query will show a result like this:

14-01-2014 08-28-06

create unattended service account in SharePoint’s Secure Store Service

On the the SharePoint Central Administration website home page, in the Application Management section, click Manage service applications.

  • Click the Secure Store Service service application.
  • On the ribbon, click New.
  • In the Target Application ID box, type an ID for the target application (for example, ScomSqlRead).
  • In the Display Name box, type a name for the target application.
  • In the Contact E-mail box, type an email address.
  • In the Target Application Type drop-down list, select Group.
  • Click Next.
  • Leave the default credential fields, and then click Next.
  • On the “Specify the membership settings” page:
    • In the Target Application Administrators box, type the account of the user who will administer this account.
    • In the Members box, type Everyone or Authenticated Users.

create a Visio file and add an external data connection

In Visio Professional 2013, open a diagram or create a new diagram.

  • On the ribbon, click the Data tab, and then click Link Data to Shapes.
  • On the Data Selector page, select Microsoft SQL Server database, then click Next.
  • On the Connect to Database Server page, type the name of your database server, then select Use the following User Name and Password, type in the previously created SQL internal user name and password, then click Next.
  • on the Select Database and Table page, select your previously created SQL view.
  • on the Save Data Connection File and Finish page, browse the File Name to a location on your SharePoint farm, then click to Authentication Settings.
  • 08-01-2014 19-56-05
  • On the Visio Services Authentication Settings window, select use a stored account and type in the name of the previously created unattended Service Account.
  • 08-01-2014 21-05-27
  • on the Connect to data page, select All Columns and All Data, then click Next.
  • 08-01-2014 19-58-18
  • on the page Configure Refresh Unique Identifier, select the BaseManagedEntityID and click Next.
  • 10-01-2014 08-18-15
  • now you should have your datas visible in Visio:
  • 14-01-2014 08-38-28
  • To make the Shapes clickable, right click the External Data table and select Column Settings:
  • 14-01-2014 08-40-03
  • in the Column Settings window, select the URL column and click to Data Type:
  • 14-01-2014 08-41-57
  • mark the Hyperlink checkbox, then click twice to OK.
  • 14-01-2014 08-43-40

add data graphics to shape

after adding any type of shape to your Visio diagram, you can drag and drop your data rows to the shape.

the SCOM entities can have several states, which can presented by editing the Data Graphics. to do this follow this steps:

  • right click your shape and select Data and then Edit Data Grahic
  • now you can add several Icon sets like this:
Icon Set: Datafield: Icon: equals:
14-01-2014 17-21-17 ={In Maintenance}&{Managed} 14-01-2014 17-21-17 TRUETRUE
14-01-2014 17-27-09 ={Health State}&{In Maintenance}&{Managed} 14-01-2014 17-27-09-2 SuccessTrueTrue
14-01-2014 17-27-09-3 UninitializedTrueTrue
14-01-2014 17-27-09-4 WarningTrueTrue
14-01-2014 17-27-09-5 ErrorTrueTrue
15-01-2014 07-22-37 ={Health State}&{Is Available}&{In Maintenance}&{Managed} 15-01-2014 07-22-37-2 SuccessTrueFalseTrue
15-01-2014 07-22-37-3 UninitializedTrueFalseTrue
15-01-2014 07-22-37-4 WarningTrueFalseTrue
15-01-2014 07-22-37-5 ErrorTrueFalseTrue
15-01-2014 07-28-04 ={Health State}&{Is Available}&{In Maintenance}&{Managed} 15-01-2014 07-28-04-2 SuccessFalseFalseTrue
15-01-2014 07-28-04-3 UninitializedFalseFalseTrue
15-01-2014 07-28-04-4 WarningFalseFalseTrue
15-01-2014 07-28-04-5 ErrorFalseFalseTrue
15-01-2014 07-32-18-2 =STRSAME({Managed},”true”,TRUE) 15-01-2014 07-32-18-2 FALSE

at shapes with rule values, you can now add data graphics, showing the value. for example the percentage usage of a logical disk:

Data Bar Style: Data field:
Progressbar =100-{SampleValue}

the shape should now look like this:

15-01-2014 07-39-00

present the file to SharePoint

After creating the Visio diagram, save it to your SharePoint Farm as a Visio 2010 Web Drawing (*.vdw) file.

To add a Visio Web Access Web Part to a SharePoint page, do the following:

  • Navigate to the site that contains the page that you want to add a Visio Web Access Web Part to.
  • In the ribbon, on the Page tab, in the Edit group, click Edit.
  • ZA101730030
  • Under Editing Tools, on the Insert tab, in the Web Parts group, click Web Part.
  • ZA101773417
  • do the following:
    • Under Categories, click Business Data.
    • Under Web Parts, click Visio Web Access.
    • Click Add.
    • ZA102076923
  • In the opening instructions, click the link Click here to open the tool pane.
    The Web Part Page and Web Part enter Edit Mode and the Web Part Tool Pane is displayed.
  • In the tool pane, expand Web Drawing Display, and enter the URL of the Web drawing in the Web Drawing URL text box. The diagram must have the file name extension .vdw.
  • Click Apply and then click OK.

Leave a Reply