Create Grafana Dashboards

Grafana shows measurements as charts. A dashboard puts related charts on one page. Start by viewing one.

If Grafana, Prometheus, or a metric is unfamiliar, read Explore your Sauron first.

View an existing dashboard

  1. Open Grafana and sign in using your Sauron's browser access method.
  2. Open the built-in My Dashboards (Read Only) folder and choose a dashboard. If your instance uses a different folder name, ask its Grafana owner.
  3. Set the time range to the last hour and read a panel's title and units.

Success: A panel shows a recent value or chart you can explain. Built-in dashboards show Sauron's own components; they do not prove that your service's metrics have been connected. Your team's service dashboards may be in another folder.

If a panel is empty, check the selected time range first. Then check whether the panel or its data source shows an error. Ask your Sauron owner whether the expected service metric has been connected before trying to change a query. See Troubleshoot for more.

Create your first Grafana dashboard

NeedGrafana Editor or Admin access and a metric query that returns data in Prometheus.
First actionStart a new dashboard with the Prometheus datasource.
Done whenThe saved panel still shows your metric after reopening.

Ask your Sauron owner for access if needed. A data source tells Grafana where to read measurements; a query selects which ones to show. For this first dashboard, use the scrape check from Connect your service; ask your service owner for an application metric when you want to chart service behavior.

  1. Open Grafana and sign in.
  2. Choose New dashboard, then Add visualization. Select the datasource named Prometheus.
  3. Enter up{job="sauron-first-metric-test"} for the first connection walkthrough, or enter a service metric you already found in Prometheus.
  4. Set the time range to the last hour. Run the query and confirm the panel shows a recent value.
  5. Title the first panel Metrics endpoint reachable; for other queries, choose a title that describes the measurement. Save the dashboard in a folder your team can access, then reopen it. Ask your Grafana admin if you cannot select a suitable folder.
If the panel shows no data: Check the time range, datasource, query, dashboard variables, and whether the same query returns data in Prometheus or Thanos.

up checks whether Prometheus scraped the configured target. A value of 1 means the scrape succeeded; it does not measure your service's behavior. Use a metric from your service when you need a dashboard about the application.

Prove it works before production

Before sharing the dashboard, ask a teammate to open the saved version and check that each panel shows the intended data for a useful time range. If the dashboard uses filters, test the choices your team will select.

Manually Creating Grafana Dashboards

The first dashboard steps cover the UI. For more options, see the Grafana UI documentation.

Creating Grafana Dashboards via Grafana HTTP API

This example uses the classic POST /api/dashboards/db endpoint. Confirm your installed Grafana supports it; see the classic dashboard API reference.

Use an approved Grafana service account token with permission to create dashboards. Run the commands in Bash. First save this request as dashboard.json in your current directory; it creates an empty dashboard:

{
  "dashboard": {
    "title": "My service dashboard",
    "panels": []
  },
  "overwrite": false
}

For a dashboard with panels, export one you created in the UI and place its definition under dashboard in the request. Review its ID, UID, folder, and overwrite settings using the API reference before upload.

Then send the prepared file:

read -r -s -p 'Grafana service account token: ' GRAFANA_SERVICE_ACCOUNT_TOKEN; echo

curl --fail --show-error -i -XPOST \
  -H "Authorization: Bearer ${GRAFANA_SERVICE_ACCOUNT_TOKEN}" \
  -H 'Content-Type: application/json' \
  --data-binary @./dashboard.json \
  'https://grafana.stage.apatil.developers.oracledx.com/api/dashboards/db'

Check: The response reports success and returns the dashboard URL. Open it in Grafana. The empty example has no charts until you add panels.

Built-in Data sources

Sauron provisions a default metrics datasource named Prometheus. When Thanos is enabled for the instance, the default datasource queries Thanos; otherwise it queries Prometheus directly. The datasource name alone does not tell you which backend is in use. For missing data, follow the dashboard checks.

Built-in My Sauron Dashboards

The operator provisions My Dashboards (Read Only) with dashboards for components such as OpenSearch and Prometheus. View one before building a dashboard for your service.

Tips and checks

  • Tips: Use clear panel titles and units. Keep each dashboard focused on one service or question. Grafana dashboard guidance.
  • Check: Save and reopen the dashboard. For an empty panel, follow the dashboard checks.