Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To obtain the recorded metric from Micrometer/Prometheus, you can use the Prometheus endpoint to access the data. Here are the steps to follow:

  1. Start the Prometheus server and configure Micrometer to publish its metrics to it.

  2. Access the Prometheus user interface by opening a web browser and navigating to "http://localhost:9090" (or the URL where Prometheus is running).

  3. In the query box, enter the name of the metric you want to retrieve, for example:

    my_application_requests_total

  4. Click the "Execute" button. This will show the metric values for the selected time range.

  5. To view the recorded metric data, click the "Graph" tab to display a graph of the metric over time. You can adjust the time range and resolution using the controls below the graph.

  6. To download the metric data, click the "Download" button and select a format (such as CSV or JSON). This will generate a file containing the metric values for the selected time range.