"Warsaw": Prometheus can't scrape the webserver

Scenario: "Warsaw": Prometheus can't scrape the webserver

Level: Medium

Type: Fix

Tags: pro   realistic-interviews  

Description: A developer created a golang application that is exposing the /metrics endpoint. They have a problem with scraping the metrics from the application. They asked you to help find the problem.

Full source code of the application is available at the /home/admin/app directory.

Credit Kamil Błaż

Test: The endpoint http://localhost:9000/metrics should return HTTP code 200.

The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.

Time to Solve: 30 minutes.


Static Badge      X (formerly Twitter) Follow      GitHub Repo stars      Mastodon Follow      Uptime Robot ratio (30 days)
Updated: 2024-04-20 23:41 UTC – 9d41e63