Build Big Screen Dashboards Using ZENworks Reporting

One of the requests that I’ve heard several times over the years is to be able to create big screen dashboards for the teams that support ZENworks. This could be for any of the ZENworks products, including ZENworks Configuration Management and Micro Focus Service Desk. In this article I will help you understand how ZENworks Reporting and JasperStudio can be used together to create big screen dashboards that will help you quickly identify trends in the environment.

Before we get into the details, a quick word about the things you need:

  • ZENworks Reporting Appliance. ZENworks Reporting is available only as a virtual appliance and is one of the downloads you can download from the same product download page you downloaded your other ZENworks products from. The ZENworks Reporting Appliance provides the web based reporting creation and dashboarding tools that we will use to deliver the dashboard.
  • JasperStudio. JasperStudio is a tool for advanced users that can be used to create pixel-perfect reports. In this article we’ll use JaspertStudio to create some small dashboard widgets that would otherwise not be possible from the web based Ad hoc viewer.
  • Reporting Domain. A reporting domain is a metadata layer that eliminates the need for you to understand the database schema when building reports with the ad hoc report builder. Depending on the data you want to access you will need different domains installed. For the purpose of this article we will be using the ZENworks Domain.

First of all let’s take a look at the finished product so that you know what it is we are building towards. Have a look at figure 1. This is just one of many possible dashboards that you can build with the techniques discussed in this article.

This dashboard offers a quick view of information about the devices being managed in the system and whether they are checking in as expected.

38-jb-zen-dashboards-1b
Figure 1: A sample dashboard featuring 3 dashlets

Building Adhoc Dashlets

We’ll start by looking at how to build the dashlets created with the Adhoc report designer. These are by far the easiest dashlets to build. In the example dashboard these are the Managed Devices by OS and Agent Distribution by Platform dashlets. You can use the Ad Hoc designer to build chart, table and crosstab dashlets.

Agent Distribution by Platform Dashlet

The first dashlet for our dashboard will display a breakdown of the agent and application versions being used on the devices in the zone. These will be broken down by platform and then by agent version.

  1. Browse to your ZRS Server console (https://<server>/jasperserver-pro)
  2. Login as a user that has permissions to create reports.
  3. Select Create > Ad Hoc View.
  4. From the list of domains, select the ZENworks Domain; then click OK.
  5. You now need to select the data that you want to have available for this dashlet :
    ZENworks System > Managed Device Status > Managed device count
    ZENworks System > Managed Device Status > ZENworks Agent Version
    ZENworks System > Managed Device Status > Platform
  6. Click OK.
  7. Next select the Chart type report and then drag the elements that you see in the screen shot below to the Columns, Rows and Filters area. This should result in a pie chart.
  8. Next click the gears icon and choose Chart Types… and then select the Stacked Column chart type. Close the chooser and then slide the Data Level sliders all the way to the right. You should now have a chart that looks very similar to figure 2.  Since this is a chart that will go on a dashboard, you can also hide the title since it will already be listed in the dashboard by clicking jb-zen-dashboards-4  and toggling the title bar.
  9. Now save this Adhoc View with the title that you want to appear on the Dashboard.
jb-zen-dashboards-2b
Figure 2: The completed 'Agent Distribution by Platform' dashlet

Managed Devices by OS Dashlet

The next dashlet shows you the distribution of OS’s being managed in the environment broken down by major version.

  1. Select Create > Ad Hoc View.
  2. From the list of domains, select the ZENworks Domain; then click OK.
  3. You now need to select the data that you want to have available for these dashlets. The data required for building the Agent Distribution by Platform Dashlet is
    ZENworks System > Managed Device Status > OS Name
    ZENworks System > Managed Device Status > Managed device count
  4. Click OK.
  5. Because the data stored in the database does not include a value for OS and Version in a friendly way we’ll use a Calculated Field to get the data in the form we want. To do this, in the fields header, click the dropdown and select Create calculated field.
  6. For Field Name, enter OS.
  7. In the Formula builder enter something like this
     “IF(StartsWith(“OS Name”, ‘Android-6’), ‘Android 6’, IF(StartsWith(“OS Name”, ‘iOS-10’), ‘iOS 10’, IF(StartsWith(“OS Name”, ‘iOS-9’), ‘iOS 9’, IF(StartsWith(“OS Name”, ‘windows10’), ‘Windows 10’, IF(StartsWith(“OS Name”, ‘win2012r2’), ‘Windows 2012R2’, IF(StartsWith(“OS Name”, ‘sles-12’), ‘SUSE Linux Enterprise Server 12’))))))”
  8. Save the Custom Field.
  9. Next select the Chart type report and then drag the elements that you see in the screen shot below to the Columns, Rows and Filters area. This should result in a pie chart.
  10. Next click the gears icon and choose Chart Types… and then select the Stacked Column chart type. Close the chooser and then slide the Data Level sliders all the way to the right. You should now have a chart that looks very similar to figure 3.
  11. Since this is a chart that will go on a dashboard, you can also hide the title since it will already be listed in the dashboard by clicking jb-zen-dashboards-4 and toggling the title bar.
  12. Now save this Adhoc View with the title that you want to appear on the Dashboard.

You have now built the second adhoc widget you need for your dashboard.

jb-zen-dashboards-3b
Figure 3: The completed 'Managed Device by OS' dashlet

Building Dashlets with JasperStudio

The next dashlets that we need to build for our dashboard cannot be built with the Ad Hoc designer because they are not domain elements and because the types of elements we want to create are not available in Ad Hoc designer. Unlike Ad Hoc designer which uses the domain to generate data, JasperStudio can use either the domain or handcrafted SQL. In these examples we use handcrafted SQL.

% Devices Contacting Zone in Last 24 Hours

The first dashlet we want to create is a graphic indicator that shows the percentage of devices that are contacting the zone within at least the last 24 hours. We want to display it in such a way as to know when things are good, when they are concerning and when they are critical.  These values could be different in your environment and you could adjust them appropriately.

Let’s take a look at how to build out this dashlet.

  1. Install and launch JasperStudio.
  2. Create a data adapter for the ZENworks Database.
    In the top right pane, right click Data Adapters and select Create data adapter.
    From the Data Adapters list, select Database JDBC Connection.
    In the Name field, enter ZENworks Database.
    In the JDBC Driver field, select the driver that corresponds to the type of database you are using.
    Update the JDBC Url field to reference you server and database names, similar to this:
    jdbc:tibcosoftware:sqlserver://mssql.activedir.zenguru.info:1433;databaseName=zenworks_ZENGURU
    Enter your database username and password, then click Test. Assuming that the connection test is successful, click Finish and a new data adapter should be added. This allows JasperStudio to communicate with the ZENworks database.
  3. Create the report
    Select File > New > JasperReport
    From the Report Templates dialog, select All > Blank Letter, the click Next.
    Enter the name of the report you want to create, then click Next.
    From the Data Adapter drop-down, select the ZENworks Database adapter.
    In the Texts field enter the following SQL statement:38-jb-zen-dashboards-sqlYou should now have a dialog that looks like the one in figure 4.
    Click Next.
    On the Group By Page, click Next.
    Click Finish.

    jb-zen-dashboards-5
    Figure 4: Data source and SQL statement
  4. Customise the report.
    In the Outline pane, expand Fields and highlight CheckedInDevices.
    In the Properties pane change the Class value to java.lang.  Double to cast the field as a double value instead of an Integer. Repeat this for the TotalDevices field.
    Click on the Table and press the Delete key; then say Yes when prompted to remove everything.
    In the Outline pane, right click Title and select Delete. Repeat for Page Header, Column Header, Column Footer, Page Footer, Summary and Background.
    Right click Detail and click Add Band.
    Right click and select Page Format.
    Set the Page format as shown in figure 5:
    Click OK.

    jb-zen-dashboards-6
    Figure 5: Setting the page format
  5. Add and configure the Vertical Bullet widget to the Details pane.
    From the Palette, drag the Widgets Pro item to the Details pane.
    Select Vertical Bullet.
    Resize the image to fit the page with a room for a label underneath.
    Drag a Static Text element from the Palette to the free space below the Vertical Bullet you added and change the Text to “% Devices w/ Last Contact within 24 hrs”
    Right click the Vertical Bullet diagram and select Edit Widget Properties.
    Select the Widget Data tab.
    Select the Value and Target subtab.
    Enter ($F{CheckedInDevices}/$F{TotalDevices})*100 as the Value expression.
    Enter 100 as the Target expression.
    Select the Color Ranges tab.
    Click Add.
    In the Color chooser, select green.
    In the Label Expression, enter “Normal”, including the quotes.
    In the Min Value Expression field, enter 50.
    In the Max Value Expression field, enter 100.
    Click OK.
    Click Add.
    In the Color chooser, select yellow.
    In the Label Expression, enter “Warning”, including the quotes.
    In the Min Value Expression field, enter 15.
    In the Max Value Expression field, enter 49.99.
    Click OK.
    Click Add.
    In the Colour chooser, select red.
    In the Label Expression, enter “Critical”, including the quotes.
    In the Min Value Expression field, enter 14.99.
    In the Max Value Expression field, enter 0.
    Click OK.
    Click OK.
    In the Report Design pane click the Preview Subtab.  Make sure no errors are returned. You will see a blank report since the JasperStudio cannot render the graph. This can only be done from the web browser.
  6. Import the report into the web server so that it can be used in the dashboard.
    Save the report and make a note of the location you saved it to.
    Open the ZRS web page in a browser and login as a ZRS User.
    Right-click the Organization > Reports folder.
    Select Add Resources > JasperReport
    In the Name field enter Agent Contact Dashlet
    Click the Browse button to Upload a Local File.
    Select your report file you created.
    Click the Data Source button on the left.
    Select Select data source from repository and browse and select the ZENworks_Datasource.
    Click Submit.
    Click on the Report you added to confirm that it runs and displays the Vertical Bullet as expected.

You have now completed building your JasperStudio widget. You can use JasperStudio to build a number of additional widgets including simple clickable text fields to radiate numbers as well as other information radiators such as gauges, thermometers, etc.

Putting it all together into a dashboard

The final step is to put this all together in a dashboard. To do this you use the ZENworks Reporting Dashboard Designer and drag the reports that you have created onto the canvas. To do this:

  1. In ZENworks Reporting select Create Dashboard.
  2. From the New Content pane drag a Text element into the canvas.
  3. In the Text field, enter Device Executive Dashboard, then click OK.
  4. Resize the element to the top ½ inch or so of the screen.
  5. Right click the element and select the Scale to Fit option as Dashlet.
  6. Click OK.
  7. Now resize the dashlet to so there is no empty space at the end of it.
  8. Now drag in each of the reports you created and arrange them on the canvas in the way you want to see them.
  9. Click the Gear icon in the toolbar and enable Auto-refresh dashboard contents.
  10. Click the Preview button (eye) in the dashboard to see what your dashboard will look like.
  11. If everything works as expected then save the Dashboard.
  12. Finally, you need to determine the URL of the dashboard that you would want to display on the big screen. To do this find the Dashboard in the Repository and click on it to open it in View mode.
  13. Note the address in the bar, it should be something like : https://<server>/jasperserver-pro/dashboard/viewer.html #%2FArticleDash
  14. Modify the address to be https://<server>/jasperserver-pro/dashboard/viewer.html?decorate=no#%2FArticleDash. This removes the ZENworks Reporting menu bars so that only the dashboard is shown.
  15. If you visit this page and put the browser in Full Screen mode you are left with a dashboard that can be monitored on a big screen.

This article covered a relatively simple example of a dashboard that could be quickly built. ZENworks Reporting also provides the ability to provider interactivity and hyperlinking in the dashboard so that if you want a user to click in one dashlet and have other dashlets updated you can do that.  Additionally, with JasperStudio you have complete flexibility in creating hyperlinks to other Jasper reports or even external content.

I encourage you if you haven’t yet installed ZENworks Reporting to do so today, and then let your imagination run wild. If you have questions feel free to reach out to us at zen@microfocus.com and we’ll be happy to provide some guidance.

 

This article was first published in OHM Issue 38 (2017/3), p19-22.

 

3 Comments
    • Jason Blackett

Add a Comment