Database Reference
In-Depth Information
Many of the reports shown in Figure
11-10
are built into Hunk, but I created the fuel types, sales volumes, and
manufacturers reports. When I save a report, I can choose to add it to a dashboard that I can create at the same time.
For example, in Figure
11-11
, I create a dashboard called “Vehicle” to contain the three reports I've just mentioned.
Figure 11-11.
Hunk dashboard for reports created
To open the dashboard, I choose the Dashboards menu option, then select the Vehicle dashboard. The display
is populated from the current data, giving me, on a single page, an up-to-date view of the state of the data. A simple
example of what can quickly be created to represent HDFS-based data, Figure
11-11
shows two pie charts that display
top manufacturers and fuel types. The bottom bar graph displays sales volume by year. Once the report entries are
on the dashboard, I can edit them to add titles, or drag and drop them into the best positions to give an at-a-glance
impression of the data status.
I can also create complex
report expressions
to construct multi-column reports. For example, the following
report expression creates a table that contains the minimum CO
2
emissions by manufacturer and model and was
supplied by Ledion Bitincka, an architect at Splunk, in response to a question I submitted to the Splunk forum):
index=cdh5_vindex | stats min(c02_g_km) AS minco2 BY manufacturer, model | sort 20 minco2.
Thus, the
original search expression
index=cdh5_vindex
is passed to a
stats
function that finds the minimum CO
2
emissions
value from the column
c02_g_km
in grams per kilometer and saves it to a new column name called
minco2
. The results
placed in this column are grouped by manufacturer and model, just as you would group non-aggregated columns in
SQL. Finally, the data is sorted and the top 20 rows are displayed, creating the report shown in Figure
11-12
.
Search WWH ::
Custom Search