I am trying to monitor my Marathon jobs from my localhost via VPN. The relevant part of my monitoring config is
scrape_configs:
- job_name: 'recommender'
marathon_sd_configs:
- servers:
- 'https://<my host>/marathon'
refresh_interval: 120s
In the browser, I can see the JSON with the list of my apps at https://<my host>/marathon/v2/apps; however, when I launch Prometheus (version=1.7.2) locally, it keeps logging errors:
ERRO[224672] Error while updating services: invalid character '<' looking for beginning of value source="marathon.go:137"
and does not discover my jobs at all. My wild guess is that it hits some HTML page instead of a JSON, possibly appending a path to the host rather than to the entire URL.