Adding Grafana Dashboards

On This Page

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

  1. 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's Platform 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.
  2. 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

  1. Select your Grafana service from the platform dashboard's Services page, and log into the service with your platform credentials.

  2. From the side navigation menu, select the plus-sign icon (Side-menu plus icon) to display the Create menu, and select Dashboard from the menu.

    Create-dashboard menu selection

  3. In the new-panel Add tab, select the desired visualization type. In this step, select Table. (A graph example is provided in Step 11.)

    Table visualization-type selection

  4. Select Panel Title, and select Edit from the menu.

    Panel-title edit selection

  5. In the Metrics tab, select the Data Source drop-down arrow, and select iguazio from the list of data sources.

    Data-source selection

  6. In the first metrics-query row (A), select the query-type drop-down arrow and select the query type. Select table for querying a standard NoSQL table.

  7. 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>; ...].

    Table query parameters example

    Note
    To see the query parameters in the UI, select the query fly-out menu icon (Query menu icon) and then select the Toggle Edit Mode option from the menu. To run the defined queries, select the refresh button (Refresh icon) 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".
    • 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".
        Note

        You must set either the fields or filter parameter; you can also select to set both parameters.

      • 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/or fields parameter.

      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.

  8. Select the General tab and edit the panel title. For example, set the title to "Bank".

    Edit bank-table panel title

  9. You can optionally make additional configurations for your dashboard panel from the Options, Column Styles, and Time range tabs.

  10. From the top-menu toolbar, select the save icon (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.

    Save dashboard

    Tip
    Instead of selecting the save icon from the toolbar, you can select the settings icon (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.

    Grafana dashboard NoSQL table example

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:

Custom Grafana dashboard example

See Also