Group status bullseye style charts

Here's the source code/implementation from this discussion. Our NOC team really liked these bullseye-style graphs from another application. I re-created them for Solarwinds.

Update: Pie chart lovers can find a version of this with pie charts over here.

Prequisites

  • You must know the Group ID of the group you wish to display in the chart. The easiest way to find this is to go to the details page for the group and get the group number from the end of the URL. E.g. if the URL is https://solarwinds.yourcompany.com/Orion/NetPerfMon/ContainerDetails.aspx?NetObject=C:69, the group ID is 69.
  • SQL Server 2012 or newer. If you have an older version of SQL Server, see the note about "Older versions of SQL Server" at the end of this document.

Installation

  1. Download and unzip the attached archive.
  2. Copy GroupMemberAggregateStatus.aspx, GroupMemberAggregateStatus.aspx.cs, and globe.png to <Solarwinds install volume>\InetPub\SolarWinds\Orion\NetPerfMon\ .

Implementation

  1. On your Solarwinds NOC view page, click "Customize Page" in the page's upper right corner.
  2. Add a new Custom HTML resource and save your changes.
  3. Find the new Custom HTML resource on the page and click the "EDIT" box in the resource's upper right corner.
  4. Fill in the Title and Subtitle fields as you wish and check the "Use synchronous loading" box.
  5. Copy and paste the HTML below into the (unlabeled) URL field.

    <iframe scrollbars="none" height="170px" width="100%" src="/Orion/NetPerfMon/GroupMemberAggregateStatus.aspx?ContainerID=GROUPID" ></iframe>

    Replace GROUPID in the URL with the ID number of the group you want to display. Your resource, when completely filled in, will look similar to this:
    pastedImage_11.png
  6. Click "Submit" to save your changes.

Example of a page with several charts

NOC_view.jpg

Older versions of SQL Server

If your installation uses a version of SQL Server older than SQL Server 2012, you must edit GroupMemberAggregateStatus.aspx.cs. Find both instances of the string

concat('/Orion/NetPerfMon/ContainerDetails.aspx?NetObject=C:',C.ContainerID)

and replace it with

'/Orion/NetPerfMon/ContainerDetails.aspx?NetObject=C:'+cast(C.ContainerID as varchar)

This will continue to work after you upgrade to SQL Server 2012.

GroupMemberAggregateStatus.zip
Parents
  • First, replace the original query in GroupMemberAggregateStatus.cs

    SELECT GroupStatusSummary.Name as GroupName, SI.ShortDescription as Status, SI.StatusID as StatusID, GroupStatusSummary.detailsURL as detailsURL, '/Orion/images/StatusIcons/Small-' + SI.IconPostFix + '.gif' AS Icon, CASE WHEN GroupStatusSummary.CountStatus IS NULL THEN 0 WHEN GroupStatusSummary.CountStatus IS NOT NULL THEN GroupStatusSummary.CountStatus  END as CountStatus, GroupStatusSummary.detailsURL as [_Linkfor_CountStatus] FROM StatusInfo SI LEFT OUTER JOIN ( SELECT concat('/Orion/NetPerfMon/ContainerDetails.aspx?NetObject=C:',C.ContainerID) as detailsURL , CMS.Status , Count(CMS.Status) AS CountStatus , C.Name FROM Containers C INNER JOIN ContainerMemberSnapshots CMS on C.ContainerID = CMS.ContainerID " + whereGroup + " GROUP BY C.ContainerID, C.Name, CMS.Status) GroupStatusSummary on SI.StatusID = GroupStatusSummary.Status WHERE SI.StatusID IN (0,1,2,3,14,17) ORDER BY SI.StatusID DESC

    with this one

    SELECT GroupStatusSummary.Name as GroupName, SI.ShortDescription as Status, SI.StatusID as StatusID,

    GroupStatusSummary.detailsURL as detailsURL, '/Orion/images/StatusIcons/Small-' + SI.IconPostFix + '.gif' AS Icon,

    CASE

      WHEN GroupStatusSummary.PercentStatus IS NULL THEN 0

    WHEN GroupStatusSummary.PercentStatus IS NOT NULL THEN CAST(GroupStatusSummary.PercentStatus AS DECIMAL(8,2))/CAST(GroupStatusSummary.TotalMembers AS DECIMAL(8,2))

    END as PercentStatus,

    GroupStatusSummary.detailsURL as [_Linkfor_PercentStatus]

    FROM StatusInfo SI LEFT OUTER JOIN (

    SELECT concat('/Orion/NetPerfMon/ContainerDetails.aspx?NetObject=C:',C.ContainerID) as detailsURL

    , CMS.Status

    , Count(CMS.Status) AS PercentStatus

    ,(SELECT count('x') from ContainerMemberSnapshots where ContainerID=C.ContainerID) as TotalMembers

    , C.Name

    FROM Containers C

    INNER JOIN ContainerMemberSnapshots CMS on C.ContainerID = CMS.ContainerID

    WHERE C.ContainerID=99

    GROUP BY C.ContainerID, C.Name, CMS.Status) GroupStatusSummary on SI.StatusID = GroupStatusSummary.Status

    WHERE SI.StatusID IN (0,1,2,3,14,17)

    ORDER BY SI.StatusID DESC

    The new query will have the percentage in the column PercentStatus.

    You will need to replace any other references to CountStatus with PercentStatus.

    Second, you'll need to replace the code that draws the bullseye in GroupMemberAggregateStatus.aspx

    function chart_pie (...

    with code that draws a pie chart with wedges instead. This part is left as an exercise to the reader emoticons_wink.png

Reply
  • First, replace the original query in GroupMemberAggregateStatus.cs

    SELECT GroupStatusSummary.Name as GroupName, SI.ShortDescription as Status, SI.StatusID as StatusID, GroupStatusSummary.detailsURL as detailsURL, '/Orion/images/StatusIcons/Small-' + SI.IconPostFix + '.gif' AS Icon, CASE WHEN GroupStatusSummary.CountStatus IS NULL THEN 0 WHEN GroupStatusSummary.CountStatus IS NOT NULL THEN GroupStatusSummary.CountStatus  END as CountStatus, GroupStatusSummary.detailsURL as [_Linkfor_CountStatus] FROM StatusInfo SI LEFT OUTER JOIN ( SELECT concat('/Orion/NetPerfMon/ContainerDetails.aspx?NetObject=C:',C.ContainerID) as detailsURL , CMS.Status , Count(CMS.Status) AS CountStatus , C.Name FROM Containers C INNER JOIN ContainerMemberSnapshots CMS on C.ContainerID = CMS.ContainerID " + whereGroup + " GROUP BY C.ContainerID, C.Name, CMS.Status) GroupStatusSummary on SI.StatusID = GroupStatusSummary.Status WHERE SI.StatusID IN (0,1,2,3,14,17) ORDER BY SI.StatusID DESC

    with this one

    SELECT GroupStatusSummary.Name as GroupName, SI.ShortDescription as Status, SI.StatusID as StatusID,

    GroupStatusSummary.detailsURL as detailsURL, '/Orion/images/StatusIcons/Small-' + SI.IconPostFix + '.gif' AS Icon,

    CASE

      WHEN GroupStatusSummary.PercentStatus IS NULL THEN 0

    WHEN GroupStatusSummary.PercentStatus IS NOT NULL THEN CAST(GroupStatusSummary.PercentStatus AS DECIMAL(8,2))/CAST(GroupStatusSummary.TotalMembers AS DECIMAL(8,2))

    END as PercentStatus,

    GroupStatusSummary.detailsURL as [_Linkfor_PercentStatus]

    FROM StatusInfo SI LEFT OUTER JOIN (

    SELECT concat('/Orion/NetPerfMon/ContainerDetails.aspx?NetObject=C:',C.ContainerID) as detailsURL

    , CMS.Status

    , Count(CMS.Status) AS PercentStatus

    ,(SELECT count('x') from ContainerMemberSnapshots where ContainerID=C.ContainerID) as TotalMembers

    , C.Name

    FROM Containers C

    INNER JOIN ContainerMemberSnapshots CMS on C.ContainerID = CMS.ContainerID

    WHERE C.ContainerID=99

    GROUP BY C.ContainerID, C.Name, CMS.Status) GroupStatusSummary on SI.StatusID = GroupStatusSummary.Status

    WHERE SI.StatusID IN (0,1,2,3,14,17)

    ORDER BY SI.StatusID DESC

    The new query will have the percentage in the column PercentStatus.

    You will need to replace any other references to CountStatus with PercentStatus.

    Second, you'll need to replace the code that draws the bullseye in GroupMemberAggregateStatus.aspx

    function chart_pie (...

    with code that draws a pie chart with wedges instead. This part is left as an exercise to the reader emoticons_wink.png

Children
No Data