Adding Panels
Each visualization on a dashboard is called a panel. Panels can be arranged and resized to your liking to best represent your data.
There are 3 ways to add panels to a dashboard:
- via the
dashboard editor - via an
ad-hoc search - via a
saved search
Via Dashboard Editor
Let's start by adding a panel that lists the datasets available to us using the dashboard editor.
- Click the
dashboard optionsicon at the top right of the page.
- Click
Edit. - Add a
panelin 1 of 2 ways:- Click the
Add Visualization Panellink in the center of thedashboard. This is only available on anew/empty dashboard. - Click the
Addtoggle at the top right of the page, then clickVisualization.
- Click the
- In the
Editmodal, click theSavedtab.
You'll notice here that you have the ability to add any search that you have saved to the dashboard as a panel this way. Since, we don't have a saved search yet (at least not one that we want to use here) we'll continue by adding an ad-hoc search.
- Click the
New Searchtab. - In the Name field enter
Datasets. - In the
query boxenter:dataset="$vt_datasets" id in ("cribl*", "default*")
| project dataset=id, description - Click
Search. - Change
TypetoTable. - Enable the
Show row numberstoggle. - Click
Save. - Click
XonEditmodal.
Now we have a list of our system's datasets. Let's continue adding more panels.
Via Ad-hoc Search
This time we are going to add a panel using the ad-hoc search method.
- Click the
Search Homeicon in the left sidebar.
- In the
query boxenter:dataset="$vt_datasets" id in ("cribl*", "default*")
| summarize datasets=dcount(id) by provider.type - Click
SEARCH. - Change the
TypetoDonut. - Above the
Chart settingsclick theActionsdropdown. - Click
Add to Dashboard. - For the
Panel titleenterDatasets per Provider. - Ensure
Use Existingis selected and select theSBX Sample Dashboardfrom the dropdown list. - Click
Add & Go to Dashboard.
Behold! You just added a visualization to your dashboard on-the-fly. Why stop now? In the words of DJ Khaled it's time to do another one.
Via Saved Search
- Click the
Search Homeicon in the left sidebar.
- In the
query boxenter:.show objects(cribl_*, default_*)
| eventstats type_total=sum(size) by datasetType
| summarize size=sum(size), total=max(type_total) by dataset, datasetType
| extend pct=round(size/total, 2)*100
| pivot pct over dataset by datasetType - Click
SEARCH. - Above the
Chart settingsclick theActionsdropdown. - Click
Save Search. - In the
Namefield enterDatasets by Type and Size. - Click
Save.
Now that we have a saved search we'll add it to our dashboard.
- Click the
Savedtab above thequery box. - Click the
saved search optionsicon to the right of your
saved search. - Click Add to Dashboard.
tip
You can also save historic ad-hoc searches to dashboards in this same way. To do this:
- Click the
Historytab instead of theSavedtab. - Click the
search optionsicon to the right of your
historic searchand follow the next steps as you would for asaved search.
- Click the
- For
Panel titleenterDatasets by Type & Size. - Ensure
Use Existingisselectedand select theSBX Sample Dashboardfrom the dropdown list. - Click
Add & Go to Dashboard.
We just as easily could have added this saved search as a panel using the Saved tab of the dashboard's Add Visualization option as we did in the Via Dashboard Editor.
Now our saved search has been added to the end of our dashboard. By default, saved searches are added to the dashboard as an Events visualization type which, quite frankly, isn't the best for our purposes. No worries though, next we'll show how we can update the visualization of these panels directly within the dashboard and without altering our search query.