Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently, the HICC graphing JSP is capable of reading any JDBC-compatible database and graphing the results, but it isn't able to parse JSON or other data from REST data sources. It would be good to define a REST data format and add the ability for the HICC graph JSP to request and understand this format.

        Activity

        Hide
        eyang Eric Yang added a comment -

        The charting widget could be modified with the following changes in mind:

        {
        "id":"rest_metrics",
        "title":"Metrics From Rest API",
        "version":"0.1",
        "categories":"System Metrics,Cluster,Status",
        "module":"iframe/jsp/single-series-chart-javascript.jsp",
        "description":"Display cluster related stats by percentage",
        "screendump":"\/images\/server_load.gif",
        "refresh":"15",
        "parameters":[
        *

        {"name":"series","type":"string","value":"series_name","edit":"0"}

        ,*
        *

        {"name":"data","type":"string","value":"http://localhost:8080/hicc/jsp/test.jsp","edit":"0"}

        ,*

        {"name":"y_axis_max","type":"string","value":"100","edit":"0"}

        ,

        {"name":"display_percentage","type":"string","value":"1","edit":"0"}

        ,

        {"name":"period","type":"custom","control":"period_control","value":"","label":"Period"}

        ,
        {"name":"width","type":"select","value":"300","label":"Width","options":[

        {"label":"300","value":"300"}

        ,

        {"label":"1200","value":"1200"}

        ]},
        {"name":"height","type":"select","value":"200","label":"Height","options":[

        {"label":"200","value":"200"}

        ,

        {"label":"1000","value":"1000"}

        ]},
        {"name":"legend","type":"radio","value":"on","label":"Show Legends","options":[

        {"label":"On","value":"on"}

        ,

        {"label":"Off","value":"off"}

        ]}
        ]}

        By using the series,data key value pair, it will fetch data from the remote REST API data source. The remote data source should return:

        {"name":"series_name","data":[[x,y],[x2,y2]]}

        Multiple data could be submitted, and the system will send ajax request to fetch each series. Let me know if this works for you.

        Show
        eyang Eric Yang added a comment - The charting widget could be modified with the following changes in mind: { "id":"rest_metrics", "title":"Metrics From Rest API", "version":"0.1", "categories":"System Metrics,Cluster,Status", "module":"iframe/jsp/single-series-chart-javascript.jsp", "description":"Display cluster related stats by percentage", "screendump":"\/images\/server_load.gif", "refresh":"15", "parameters":[ * {"name":"series","type":"string","value":"series_name","edit":"0"} ,* * {"name":"data","type":"string","value":"http://localhost:8080/hicc/jsp/test.jsp","edit":"0"} ,* {"name":"y_axis_max","type":"string","value":"100","edit":"0"} , {"name":"display_percentage","type":"string","value":"1","edit":"0"} , {"name":"period","type":"custom","control":"period_control","value":"","label":"Period"} , {"name":"width","type":"select","value":"300","label":"Width","options":[ {"label":"300","value":"300"} , {"label":"1200","value":"1200"} ]}, {"name":"height","type":"select","value":"200","label":"Height","options":[ {"label":"200","value":"200"} , {"label":"1000","value":"1000"} ]}, {"name":"legend","type":"radio","value":"on","label":"Show Legends","options":[ {"label":"On","value":"on"} , {"label":"Off","value":"off"} ]} ]} By using the series , data key value pair, it will fetch data from the remote REST API data source. The remote data source should return: {"name":"series_name","data":[[x,y],[x2,y2]]} Multiple data could be submitted, and the system will send ajax request to fetch each series. Let me know if this works for you.
        Hide
        eyang Eric Yang added a comment -

        The only required parameter is data: url, series_name, and render:[line,bar,scatter,area] are optional.

        Show
        eyang Eric Yang added a comment - The only required parameter is data: url , series_name, and render: [line,bar,scatter,area] are optional.
        Hide
        asrabkin Ari Rabkin added a comment -

        +1

        Show
        asrabkin Ari Rabkin added a comment - +1
        Hide
        eyang Eric Yang added a comment -

        I just committed this. Thanks Ari.

        Show
        eyang Eric Yang added a comment - I just committed this. Thanks Ari.
        Hide
        hudson Hudson added a comment -

        Integrated in Chukwa-trunk #131 (See http://hudson.zones.apache.org/hudson/job/Chukwa-trunk/131/)
        . Added REST API charting capability. (Eric Yang)

        Show
        hudson Hudson added a comment - Integrated in Chukwa-trunk #131 (See http://hudson.zones.apache.org/hudson/job/Chukwa-trunk/131/ ) . Added REST API charting capability. (Eric Yang)

          People

          • Assignee:
            eyang Eric Yang
            Reporter:
            stephenenelson Stephen Nelson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 240h
              240h
              Remaining:
              Remaining Estimate - 240h
              240h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development