I have Prometheus and Alertmanger (w/ Pusher) configured to monitor various platforms on which I deploy services and alert me if I leave resources deployed. I don’t use Grafana because I don’t need it for this use.
I’d like to include fly.io using the Prometheus endpoint but I’ve been unable to determine whether the API accepts federate|
remote_read` requests.
curl \
--silent \
--header "Authorization: Bearer ${TOKEN}" \
--write-out '%{response_code}' \
http://api.fly.io/prometheus/{$ORG}/api/v1/federate/match[]={__name__=~".+"}"
And permutations of:
curl \
--silent \
--header "Authorization: Bearer ${TOKEN}" \
--write-out '%{response_code}' \
http://api.fly.io/prometheus/${ORG}/api/v1/read
Return 400
so I’m assuming not.
remote_read:
- url: "https://api.fly.io/prometheus/{org}/api/v1/read"
authorization:
credentials: "{token}"
If I can configure the Prometheus server to scrape e.g. fly_instance_up
, I could configure a rule to alert for it being non-zero.
Or am I missing an obvious alternative?
Thanks!