Task flow in using the KairosDB UI
You can perform tasks in sequence to use the KairosDB UI to query the data store and graphically view stub metrics for virtual services.
Launching the KairosDB UI
To view the query and the graph of the metrics for the stubs running on Rational Test Control Panel, you must launch the KairosDB UI.
You must complete the prerequisite tasks before you launch the KairosDB UI. You must use a browser on the same system that is running the Rational Test Control Panel instance.
You have successfully launched the KairosDB UI. However, you must configure more settings to view the graph.
You must continue to select a time range for the data points stored.
Selecting a time range and the time zone
You must first select the time range during which the KairosDB collected the metrics for the stubs. The time would correspond to the time when the stubs ran on Rational Test Control Panel.
You can also find the time when the stubs ran by using the Usage page accessed from Rational Test Control Panel. For more information, see Viewing usage statistics of virtual services in Rational Test Control Panel.
You have successfully configured the time range and the time zone by using the KairosDB UI.
Selecting metrics
You must select metrics for the stubs you ran to include them in the KairosDB query.
You must have completed the prerequisite tasks before you launch the KairosDB UI. You must use a browser on the same system that is running the Rational Test Control Panel instance. You must have launched the KairosDB UI and configured the time range before you select the metrics.
You can view the basic graph for the query or you can customize the view by grouping the data points and assigning aggregators to the grouped metrics.


You can continue to group the metrics.
Grouping metrics
You can group the data points collected for the metrics in the database into groups and assign aggregators to the grouped data so that the data values can be presented in a simplified graph.
- By tags
- By a time range
- By value
You can assign more than one group to a metric. For example, you can group by a tag and time range so that you can see the grouped data points in a simplified view in the graph.
Grouping by tags
- To add a grouping item, click the
icon adjacent to Group By label. - Select Tags from the list. The screen shown in
Figure 6
is displayed.
Figure 6. The Group by panel 
- Enter the tags you want to select for the data points in the
Tags field. You can also use the
Search icon (
) and add the tags from the list displayed for the metric. See Figure 7.
Figure 7. Adding Tags to the group 
You can add multiple Group by items for the same metric by completing the tasks in Step 1 to Step 3.
You can view the graph for the query created by clicking Graph.

Grouping by time
- To add a grouping item, click the
icon adjacent to Group By label. - Select Time from the list. The screen shown in
Figure 9 is
displayed.
Figure 9. The Group by time panel 
- Set the number of data points you want to be grouped in the Target Size field. For example, you can set the grouping of the data points for every 30 Seconds.
- Select the time value from the list. See Figure 10 for
the time values you can select.
Figure 10. Time-values for selection 
- Set the number of records for which, you want to view the metrics in the Count field. For example, 10.
You can view the graph for the query created by clicking Graph.

Grouping by value
- To add a grouping item, click the
icon adjacent to Group By label. - Select Value from the list. The screen shown in
Figure 12 is
displayed.
Figure 12. The Group by value panel 
- Set the data value you want the data points within or equal to that value that is to be grouped in the Target Size field.
You can view the graph for the query created by clicking Graph.

Assigning aggregators
After you group the data points, you can assign aggregators to the grouped data points so that the selected operation is performed on the data points. For example, you can count the number of data points that exist in a 10-minute time period.
The graph is displayed for the query you created.

Assigning tags
You can use Tags in your query for the selected metric so that the result displays the data points with the selected tags and their values specified.
The graph is displayed for the query you created.

Viewing the graph
You can view the graph for the query you created using the KairosDB UI. You can view the graph at any stage of the query you are creating.
- You have set up the database to collect the data points for the stub metrics, published stubs, and ran tests in IBM Rational Integration Tester.
- You have launched and set the time range in the KairosDB UI.
- You have selected the metrics for which you want to view the graph.
Using the link to the graph
You can create a link to the graph for your query by using the KairosDB UI so that others can use the link to view the graph.
- You must have created a query for the stub metric you are interested in.
- You must have created the graph for your query and is displayed in the UI.
The graph link can be used to directly view the graph in a browser.
Viewing and saving the query
After you create your query by using the KairosDB UI, you can view the query and save it to the local folder that you can use later to reload the query in the KairosDB UI.
You can save your query as a JSON query text file that you can use later in the HTTP requests to get the data points and their values in the HTTP response.
You can retrieve the data points from the KairosDB data store by using the HTTP requests, GET or POST.
Using the saved JSON request
You can use the saved JSON query with an HTTP POST or HTTP GET to retrieve the raw data points and their values from the KairosDB data store.
You must have saved the query you created as a JSON text file.
You can retrieve the metrics data points from the KairosDB data store by using the JSON query you saved. Apart from the HTTP request, you can also use the REST APIs to query the KairosDB to fetch details about the metrics, tags, metric data points, and so on. For more information about the KairosDB REST API, see KairosDB REST API .
The response to the HTTP GET or HTTP POST request returns the data points and their values in the JSON format.












