prometheus / blackbox_exporter

Blackbox prober exporter
https://prometheus.io
Apache License 2.0
4.44k stars 1.03k forks source link

Add body_matches to url params #1221

Closed jeremybusk closed 3 months ago

jeremybusk commented 3 months ago

Allows you to pass in a "list" of comma separated items to probe for fail_if_body_not_matches_regexp with URL parameter body_matches

I feel this would be very useful option to cut down on having to make a lot of config modules to match different regex items. I shortened param name for less characters is URL.

Example:

curl -s "http://localhost:9115/probe?target=https://example.com&module=http_2xx&debug=true&body_matches=example,item1,item2"