Skip to content

Commit

Permalink
docs(plutono): How to create dashboards (#449)
Browse files Browse the repository at this point in the history
* docs(plutono): How to create dashboards

* docs(plutono): formatting

* docs(plutono): short links

Co-authored-by: Tommy Sauer <[email protected]>

* docs(plutono): link var

Co-authored-by: Tommy Sauer <[email protected]>

* docs(plutono): improved wording

Co-authored-by: Tommy Sauer <[email protected]>

* docs(plutono): wording

---------

Co-authored-by: Tommy Sauer <[email protected]>
  • Loading branch information
richardtief and viennaa authored Oct 18, 2024
1 parent 36914dd commit f744a95
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions plutono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ The plugin works by factory default with anonymous access enabled. If you use th

Dashboards are selected from `ConfigMaps` across namespaces. The plugin searches for `ConfigMaps` with the label `plutono-dashboard: "true"` and imports them into Plutono. The `ConfigMap` must contain a key like `my-dashboard.json` with the dashboard JSON content. [Example](https://github.com/cloudoperators/greenhouse-extensions/blob/main/plutono/README.md#example-dashboard-config)

A guide on how to create dashboards can be found [here](#dashboard).

**Step 2: Add your datasources**

Data sources are selected from `Secrets` across namespaces. The plugin searches for `Secrets` with the label `plutono-dashboard: "true"` and imports them into Plutono. The `Secrets` should contain valid datasource configuration YAML. [Example](https://github.com/cloudoperators/greenhouse-extensions/blob/main/plutono/README.md#example-datasource-config)
Expand Down Expand Up @@ -332,12 +334,39 @@ dashboards:
datasource:
- name: DS_PROMETHEUS
value: Prometheus
- name: DS_LOKI
value: Loki
local-dashboard:
url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json
```

## Create a dashboard {#dashboard}

1. Click **Dashboards** in the main menu.
2. Click **New** and select **New Dashboard**.
3. Click **Add new empty panel**.
4. **Important:** Add a datasource variable as they are provisioned in the cluster.
- Go to **Dashboard settings**.
- Click **Variables**.
- Click **Add variable**.
- General: Configure the variable with a proper **Name** as **Type** `Datasource`.
- Data source options: Select the data source **Type** e.g. `Prometheus`.
- Click **Update**.
- Go back.

5. Develop your panels.
- On the **Edit panel** view, choose your desired **Visualization**.
- Select the datasource variable you just created.
- Write or construct a query in the query language of your data source.
- Move and resize the panels as needed.
6. Optionally add a **tag** to the dashboard to make grouping easier.
- Go to **Dashboard settings**.
- In the **General** section, add a **Tag**.
7. Click **Save**. Note that the dashboard is saved in the browser's local storage.
8. Export the dashboard.
- Go to **Dashboard settings**.
- Click **JSON Model**.
- Copy the JSON model.
- Go to your Github repository and create a new JSON file in the `dashboards` directory.

## BASE64 dashboards

Dashboards could be stored on a server that does not return JSON directly and instead of it returns a Base64 encoded file (e.g. Gerrit)
Expand Down

0 comments on commit f744a95

Please sign in to comment.