Adding Grafana Dashboards
Overview
The platform includes a pre-deployed version of the open-source Grafana analytics and monitoring platform. For detailed information about working with Grafana, see the Grafana documentation. The platform has predefined dashboards:
- Model Monitoring Overview
- Model Monitoring Performance
- Model Monitoring Details
- Model Monitoring Applications
Grafana allows the creation of custom web dashboards that visualize real-time data queries.
This tutorial outlines the steps for creating your own Grafana dashboard for querying data in the your cluster's data containers by using the custom iguazio
Grafana data source.
You can repeat this procedure to create as many dashboards as you wish.
Prerequisites
-
To use Grafana to visualize data in the platform, you first need to create a new Grafana service from the dashboard
Services page. For general information about creating new services, see creating a new service.- In cloud platform environments, Grafana is currently available as a shared single-instance tenant-wide service.
- To add the
iguazio
data source to your Grafana service, you must set the service'sPlatform data-access user parameter to a platform user whose credentials will be used for accessing the data in the platform. - Node Selector can be used to constrain the nodes on which your Pod can be scheduled, based on node labels.
-
To successfully submit queries and visualize data with Grafana, you need to have data in you cluster's data containers that matches your queries. The instructions in this tutorial demonstrate how to create a dashboard that queries the following tables; to query other tables, you'll need to adjust your dashboard configuration, and especially the query parameters, to match the path and attributes of an existing table in your cluster.
A
bank_nosql NoSQL table in the "bigdata" container. You can create a compatible table by following the instructions in the Converting a CSV File to a NoSQL Table tutorial.
Using the iguazio Data Source
-
Select your Grafana service from the platform dashboard's
Services page, and log into the service with your platform credentials. -
From the side navigation menu, select the plus-sign icon
( to display the)
Create menu, and selectDashboard from the menu. -
In the new-panel
Add tab, select the desired visualization type. In this step, selectTable . (A graph example is provided in Step 11.) -
In the
Metrics tab, select theData Source drop-down arrow, and selectiguazio from the list of data sources. -
In the first metrics-query row (
A ), select the query-type drop-down arrow and select the query type. Selecttable for querying a standard NoSQL table. -
Select the drop-down arrow for the query-parameters box (next to the query type) and enter your query parameters. The parameters are entered using the syntax
<parameter name>=<parameter value>; [<parameter name>=<parameter value>; ...]
.NoteTo see the query parameters in the UI, select the query fly-out menu icon( and then select the)
Toggle Edit Mode option from the menu. To run the defined queries, select the refresh button( from the top menu toolbar.)
The
iguazio
data source supports the following query parameters:-
backend [Required] — the backend type.- For
table queries, you must set this parameter to "kv
". - For
timeseries queries, you must set this parameter to "tsdb
".
- For
-
container [Required] — the name of the data container that contains the queried table. For example, "projects" or "users". -
table [Required] — a Unix file-system path to a table within the configured container. For example, "mytable
" (for a table in the container's root directory) or "examples/
" for a nested table.-
fields — a comma-separated list of one or more query fields to include in the query.- For
table queries, this parameter should be set to a comma-separated list of item-attribute names — for example, "id,first_name,last_name
". - For
timeseries queries, this parameter should be set to a comma-separated list of sample metric names — for example, "temperature
" or "cpu0,cpu1,cpu2
".
NoteYou must set either the
fields orfilter parameter; you can also select to set both parameters. - For
-
filter — a filter expression that restricts the query to specific items.- For
table queries, the filter is applied to the names of item attributes (table columns). For example,filter=ID>10
. - For
timeseries queries, the filter is applied to the names of labels and/or metrics. To reference a metric name in the filter, use the__name__
attribute. For example, "starts(__name__,'metric') AND device==1
".
As indicated, you must set the
filter and/orfields parameter. - For
Enter the following query parameters to query selected attributes in the "bank_nosql" table in the root directory of the "bigdata" container, or edit the parameters to match the data in another NoSQL table in your cluster:
backend=kv; container=bigdata; table=zeppelin_getting_started_example/bank_nosql; fields=age,job,marital,education,balance,housing,loan,contact,day,month,duration;
You can also add additional queries, if you wish.
-
-
-
Select the
General tab and edit the panel title. For example, set the title to "Bank". -
You can optionally make additional configurations for your dashboard panel from the
Options ,Column Styles , andTime range tabs. -
From the top-menu toolbar, select the save icon
( . Enter a new name for your dashboard, optionally change the dashboard folder, and select)
Save . For example, set the name to "Iguazio Dashboard" and save the dashboard in the default "General" folder.TipInstead of selecting the save icon from the toolbar, you can select the settings icon( to display the)
Settings page. In addition to setting the dashboard name and folder, this page lets you make other configurations; for example, you can define variables to use in your query parameters.You now have a "Bank" dashboard panel with a table that provides real-time visualization of the data in the "bank_nosql" table in the "bigdata" container.
Outcome
Go to the Grafana home page and select your "Iguazio Dashboard" dashboard from the list. You'll see your two panels on the dashboard. Note that you can change the time range for the visualization from the top-menu toolbar. You can also customize the dashboard by resizing panels and dragging them to change their arrangement. The following image demonstrates a dashboard that displays the panels that you defined in this tutorial:
