Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One way to retrieve the latest date value of a specific label from Prometheus and present it on Grafana is to use a Prometheus query to get the most recent data point for the matching label and then display it on a Grafana panel.

To do this, follow these steps:

  1. In Grafana, create a new panel and select the appropriate Prometheus data source.
  2. In the panel editor, select the Metrics tab.
  3. Select the appropriate metric that contains the label you want to retrieve the latest date value for.
  4. In the Query field, enter the Prometheus query that retrieves the most recent data point for the label, such as max_over_time(metric_name{label_name="value"}[1h]).
  5. Customize the visualization options as needed and save the panel.

This should display the latest date value of the specified label on the Grafana panel.