UCSD Custom Graph Reports

Version 12

    The following Reports are created here:



    Screen Shot 2015-01-24 at 5.31.46 PM.png



    Find the Report Name you would like to use as a biases:


    Screen Shot 2015-01-23 at 12.33.40 PM.png


    In this case the name is:


         Data Center Inventory Report


    Log in as root into UCSD and change directory to:




    Find the occurrences of this name:


         grep "Data Center Inventory Report" *


         This will result in 2 files:





    Create new files with a new name:


         cp ucs_dc_assets.report T1.report

         cp ucs_dc_inventory.xml T1.xml


    Update the files:


    cat T1.xml




      <Type>UCS Data Center Inventory Report (T1)</Type>






    cat T1.report






    <h2> Data Center Inventory Report (T1)</h2><br>

    <h5> <Cloupia:ReportScript> out.print(label); </Cloupia:ReportScript> </h5>






    Refresh the screen (browser) and after a little while the new Report should show up.


    Screen Shot 2015-01-23 at 12.52.03 PM.png


    (The services (shelladmin) could also be re-started to speed this up)


    At this point a new report can get generated it should look like this:


    Screen Shot 2015-01-23 at 12.59.31 PM.png


    Now to the customization part:


    Test #1 (adding different Model to my pie Chart)


    var totServers = dcServerList.rowCount();

    var powerOffServers = dcServerList.rowCountByColumn("Power State", "off", false);

    var modelM1 = dcServerList.rowCountByColumn("Model", "N20-B6620-1", false);

    var modelM2 = dcServerList.rowCountByColumn("Model", "N20-B6620-2", false);

    var modelM3 = dcServerList.rowCountByColumn("Model", "UCSB-B200-M3", false);

    var powerOnServers = totServers - powerOffServers;

    var serverSet = ValueSet.create();

    serverSet.add("Total Servers", totServers);

    serverSet.add("Powered On Servers", powerOnServers);

    serverSet.add("Model M1", modelM1);

    serverSet.add("Model M2", modelM2);

    serverSet.add("Model M3", modelM3);


    To make the pie chart larger (Doubled the existing numbers):









            htmlFormat.printPieChart(serverSet, "Total Servers vs Powered On Servers");




    Screen Shot 2015-01-23 at 3.54.36 PM.png


    To create a Bar Graph:




    <h4> Section-3.0: Server Model Inventory</h4>

    <p class='indent1'>


    <TABLE class='none'>

    <TR><TD class='none' valign='top' width=400>





            htmlFormat.printBarChart(serverSet, "", "Number of Servers", "Number Server Models");









    Screen Shot 2015-01-23 at 4.58.42 PM.png


    To add a column to a report turn the true to false:



            dcServerList.columnHide("ID", true);

            dcServerList.columnHide("Account Name", true);

            dcServerList.columnHide("Name", true);

            dcServerList.columnHide("Chassis ID", true);

    dcServerList.columnHide("Association", false);

            dcServerList.columnHide("Effective Memory (MB)", true);

            dcServerList.columnHide("Service Profile", true);

            dcServerList.columnHide("Availability", true);

            dcServerList.columnHide("Operation State", true);

           dcServerList.columnHide("Rack ID", true);

           dcServerList.columnHide("Host Node", true);

           dcServerList.columnHide("Hypervisor", true);

           dcServerList.columnHide("Group", true);


    Result is a new column in the report:



    Screen Shot 2015-01-23 at 5.10.20 PM.png


    The following Reports are in the zip file.  These need to be placed into this directory:





    [root@localhost tmp]# tar tvf CR-UCSM.tar

    -rw-r--r-- root/root     13562 2015-01-24 11:38:33 CR-UCSM-By-Model-Associated.report

    -rw-r--r-- root/root       242 2015-01-24 08:48:31 CR-UCSM-By-Model-Associated.xml

    -rw-r--r-- root/root     11362 2015-01-24 08:46:31 CR-UCSM-By-Model.report

    -rw-r--r-- root/root       209 2015-01-24 08:17:29 CR-UCSM-By-Model.xml

    -rw-r--r-- root/root     11126 2015-01-24 15:18:21 CR-UCSM-Interconnect.report

    -rw-r--r-- root/root       221 2015-01-24 14:14:16 CR-UCSM-Interconnect.xml

    -rw-r--r-- root/root     11102 2015-01-24 11:46:11 CR-UCSM-T1.report

    -rw-r--r-- root/root       191 2015-01-24 11:45:03 CR-UCSM-T1.xml


    Installation Example:


    scp CR-UCSM.tar root@

    ssh root@10:95.4.23

    cd /opt/infra/inframgr/managedreports/

    tar xvf /tmp/CR-UCSM.tar


    The result should look like this after browser refresh:


    Screen Shot 2015-01-24 at 5.31.46 PM.png


    Example Output of Attached Reports:


    Screen Shot 2015-01-26 at 8.29.48 AM.png


    Screen Shot 2015-01-26 at 8.28.56 AM.png


    Screen Shot 2015-01-26 at 8.29.07 AM.png


    Screen Shot 2015-01-26 at 8.30.04 AM.png


    Screen Shot 2015-01-26 at 8.30.45 AM.png


    Screen Shot 2015-01-26 at 8.30.53 AM.png