Creating a data table widget
You can create a data table widget that can be included in custom IBM® Cloud Logs dashboards.
Step 1: Enter name and description
Complete the following steps:
-
In a custom dashboard, click Add Widget
and drag and drop the Data Table widget from your side bar.
-
Replace New data table with the Name for the widget.
-
Enter a description.
Click Action icon
. Then, select Add description.
Step 2: Configure the query to define the data set
Complete the following steps:
-
Click Action icon
. Then, select Edit mode. -
For
Query 1, complete the following steps:Select the data type. Valid values are:
Logs,Metrics, andDataPrime.Select the source. Valid options are:
Priority InsightsandAnalyze and Alert.You can rename the query. Select the
and then click Rename query.
-
Enter the query.
When the data type is
DataPrime, enter a Dataprime query in the Query field.When the data type is
Logs, enter a Lucene query in the Query field. You can apply filters and aggregations.When the data type is
Metrics, specify the metric or desired PromQL in the Query field. You can apply filters and aggregations.
Step 3: Configure the widget
Complete the following steps:
-
Click Action icon
. Then, select Edit mode. -
Choose the table type in the Table View section. Valid values are
Events viewandAggregation view.When using logs as the data source, you can choose between the Events view and the Aggregated view. Metrics are automatically generated in aggregated view.
Event tables: Display a table with a list of logs ordered by time by default. You can change this to be sorted by other columns later with additional metadata and labels relevant to those events, similar to the view you see in the Explore screen.
Aggregation tables: Creates a table of values, grouped by a field or fields you specify. Each column represents a different value depending on the chosen group. Values could be a simple count or an average of the values for the specific field, for each of the defined group-by values.
-
Enter the number of Results per page. Valid options are:
10 rows,20 rows,50 rowsand100 rows. -
Choose how to view the log lines. Valid values are:
1 line,2 lines,condensed,JSON, andlist. -
In the columns section, click Manage to choose the columns that you want to display, and their order.
Step 4: Save the widget
Complete the following steps:
-
[Optional] Set the widget's dashboard time if you want to use a time range that is different from the Dashboard selected one.
-
Click Save to save your widget.
-
[Optional] Add a custom action. For more information, see Using actions to integrate with third-party services.