Eric D. Schabell: Open Dashboard and Visualization Workshop - The Perses Specification

Monday, November 27, 2023

Open Dashboard and Visualization Workshop - The Perses Specification

Getting started with Perses

Back in December of 2022 I started a series taking you on a tour of the Perses project. These articles covered this fairly new open dashboard and visualization project targeting cloud native environments. I used a getting started workshop to guide you through this series and to provide a hands-on experience for those new to visualizing observability data. 

In the previous article I took you through the Perses API and provided links to the actual online workshop content

In this article, I'll walk you through the Perses data model and open specification for visualizing data in your dashboards. 

Let's dive right in, shall we?

I'm going to preview the Perses specification as covered in my workshop lab before diving into the actual hands-on with the project.

You can find the free workshop here online:

Now let's dive into the Perses specification lab. Note this article is only a short summary, so please see the complete lab found online as the lab 4 here to work through the data model and specification yourself:

The following is a short overview of what is in this specific lab of the Perses workshop.

Perses data model

In the previous lab you explored and made use of the Perses API. You learned that you can manage your resources on the Perses platform. These resources have a structure and that structure is captured in a data model. In this lab you will explore the dashboard resource data model, learning what is required for a basic dashboard, which will be the foundation to adding your first visual metrics in the following labs.

At the highest level of the dashboard specification you have three elements:

  • Kind
  • Metadata
  • Spec

You've seen examples of the kinds of resources you can specify within the Kind element, such as a project, a dashboard, a datasource, or a globaldatasource. You are defining the type of resource this file will hold. 

The next element, Metadata, is used to define a name for the resource and you can assign the project that the resource belongs to. 

Finally, the Spec element stands for specification and its structure depends on the kind of resource you are defining. For the rest of this lab we are only going to dive into the dashboard specification. The rest of this lab spends time diving into each of these elements that make up a dashboard specification:

  • Display - defining a component name and description
  • Duration - defining a default time to look in the past for data (not for all specifications)
  • Variables - defining a list of variables for use in components
  • Panels - defining a component to gather data for visualizing on a dashboard using a query of metrics data
  • Layouts - defining the look, feel, and location of a panel in the dashboard

Each one is presented with a code example to help you understand their usage. 

For example, the display section defines what you will see (visualization) for a component on a dashboard and uses the following attributes:

  • Name - defining a component displayed name
  • Description - a description of the component
The resulting section of the resource would look something like this, pulling this example from the WorkshopProject in your workshop Perses instance:

Pulling all the examples covered in this lab together at the end, you are ready for the next lab where you will start designing your first dashboard. 

This lab leaves you one step closer to creating your own dashboards and visualizations.

More to come

Next up, I'll continue working with you through the Perses project and start designing your first dashboard. Stay tuned for more insights into real practical experience as my cloud native o11y journey continues.