Ask Your Question
1

How can the recorded metric be obtained from Micrometer/Prometheus?

asked 2023-05-10 10:24:21 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-10 10:26:02 +0000

woof gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-10 10:24:21 +0000

Seen: 19 times

Last updated: May 10 '23