This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Group status pie charts

Here's the source code/implementation for the pie chart version of the bullseye charts first mentioned in this discussion​ and later elaborated upon 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 and GroupMemberAggregateStatus.aspx.cs 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 single chart

pastedImage_2.png

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
  • Hi M-Milligan.

    I downloaded the .zip file you attached to this forum, and I was not able to locate the globe.png file.

    Can you re-attach the .zip file containing the globe.png picture?

    Thanks.

    Chiem

  • Hi Chiem,

    My mistake. This version of the chart doesn't require the globe.png file. You only need the GroupMemberAggregateStatus.aspx and GroupMemberAggregateStatus.aspx.cs files.

    I'll update the instructions.

    -Martin

  • Hi M-Milligan.

    Is there a way to have the status IDs displayed within the pie chart instead of a table??

    Thanks.

    Chiem

  • Sure. Edit GroupMemberAggregateStatus.aspx and modify the chart_pie() function so it looks like this instead:

    function chart_pie(bullseye_id, start_percent, percent_value, color, statuslabel) {

        var context = document.getElementById(bullseye_id + "_stats").getContext('2d');

        if (!context)

            return;

        var pie_d = 120;

        var pie_x = pie_d/2;

        var pie_y = pie_d/2;

        context.fillStyle = color;

        context.save();

        context.translate(pie_x, pie_y);

        context.beginPath();

        context.moveTo(0,0);

        context.arc(0, 0, (pie_d/2), (start_percent/100) * 2* Math.PI, ((start_percent + percent_value)/100) * 2 * Math.PI, false);

        context.moveTo(0,0);

        context.closePath();

        context.fill();

        var textangle = ((start_percent/100) * 2 * Math.PI) + (((percent_value/2)/100) * 2 * Math.PI);

        var chart_text = statuslabel + " " + percent_value.toString() + "%";

        var text_x = (pie_d/4)* (Math.cos(textangle));

        var text_y = (pie_d/4)* (Math.sin(textangle));

        context.translate(text_x,text_y);

        context.fillStyle='#000000';

        context.fillText(chart_text,0,0);

        context.restore();

        context = null;

    }

  • Hi There,

    I did everything explained up there.

    But I got an error saying  "The file '/Orion/NetPerfMon/GroupMemberAggregateStatus.aspx' has not been pre-compiled, and cannot be requested."  Unexpected Website Error.

    How do I compile it and is it necessary? Please help me out with this.

  • Hi dibsman,

    It looks like this error most often occurs because one of the required assemblies isn't loaded. A missing assembly will prevent real-time compilation.

    -Martin

  • Hi Martin,

    Thanks for the reply. So could you tell me how I can find out what assembly is missing? Is there a way to find it outfrom SQL Query or anything else?

    Thanks

  • Good question. Unfortunately, I don't know. I see that someone else ran into a similar problem last year. The fix was:

    1. Delete the PrecompiledApp.config from (Solarwinds install drive)/InetPub/Solarwinds/ and (Solarwinds install drive)/InetPub/Solarwinds/ui/
    2. Run the config wizard for web
    3. Copy the 3 files for this customization backinto (Solarwinds install drive)/InetPub/Solarwinds/Orion/NetPerfMon

    -Martin

  • Thanks for your reply. I wonder if I run to some other problems if I just delete the files from our Solarwinds Core Server. We are pretty new to Solarwinds and have to structure and design our Server Infrastruction in Soalrwinds. I will give it a try sometime soon. Its a pity that Solarwinds doesnt let us have an option to create our own Pie Charts for different things like this one for example.

    I will update you if it worked for me.

    Thanks Martin

  • cool.

    Thank you so much.
    I'm going to get some Pie Charts deployed tomorrow emoticons_happy.png