Skip to main content

Get Prometheus Metrics

curl -X GET https://api.example.com/monitoring/metrics
# HELP requests_total Número total de solicitudes
# TYPE requests_total counter
requests_total 1234.0
Retrieve Prometheus-formatted metrics for monitoring system health and performance. Endpoint: GET /monitoring/metrics Authentication: None required

Response

Returns metrics in Prometheus text exposition format, including:
requests_total
counter
Total number of requests processed by the system

Usage

This endpoint is designed to be scraped by Prometheus or other monitoring systems. Configure your Prometheus instance to scrape this endpoint at regular intervals:
prometheus.yml
scrape_configs:
  - job_name: 'water-quality-api'
    static_configs:
      - targets: ['api.example.com']
    metrics_path: '/monitoring/metrics'
    scrape_interval: 15s

Monitoring Home

curl -X GET https://api.example.com/monitoring/
{
  "message": "Monitoring Home"
}
Basic monitoring endpoint to verify the monitoring service is running. Endpoint: GET /monitoring/ Authentication: None required

Response

message
string
Status message

Build docs developers (and LLMs) love