Monitorinig URL Response.

20 views
Skip to first unread message

Muhammad Qasim

unread,
Jan 4, 2022, 3:15:39 AM1/4/22
to Prometheus Users

I want to monitor response returned from url to conclude if health is fine or not.

url i have returns either 0 or 1. 0 mean health is down.

should i use blackbox? or anything else?

Thanks 

Brian Candler

unread,
Jan 4, 2022, 3:28:41 AM1/4/22
to Prometheus Users
blackbox_exporter is probably the tool for this.  You can match on the status code, or use a regex to match on the body: that's fine if it's a plain "0" or "1".

If the body is JSON or XML and you want to extract a value from deep inside the structure, it might be cleaner to do it a different way.
Reply all
Reply to author
Forward
0 new messages