prometheus / blackbox_exporter

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

Add body matches to url params #1219

Closed jeremybusk closed 6 months ago

jeremybusk commented 6 months ago

Allows you to pass in a "list" of comma separated items to probe 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 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"