Skip to content

Add a panel `id` to dashboard .yml files

Background

Panels in the monitoring dashboard, the same way as metrics, should be identifiable so they can be associated with entities such as annotations, embed links, alerts, etc.

Currently, a panel is identified by a combination of type, name and y_axis which is not the most reliable approach. Based on the discussion, enforcing a panel Id seemed like the best way to go forward at this point.

Proposal

Add a new optional panel id field that is unique to a dashboard yml file.

When such a field is missing, the backend should use a computed id that corresponds to a combination of type, name and y_axis (hashed or slugified) for backward compatibility. The backend would return the id of the file in all cases.

Migration plan for existing dashboards without Panel Id

Need UX input

Additional tasks

  • Embed links should link to a panel using a panel id
  • Multiple custom metrics in a panel should be supported (needs a
  • Having added ids in panels should be validated by the backend, with a warning if it is missing
Edited by Dhiraj Bodicherla