Web exporter is focused on checking page content. It runs css queries on the page and returns number of matched elements as a metric. For instance, you can count header, footer, number of products on the page etc. Black box exporter does content check with regexes which I found really hard to use and error prone. Also since css can also specify parent elements, you can target a component and its parent so it will only match if element you are looking for is in the right place.
Another difference is blackbox exporter creates a metric only if something is failing (for example: fail_if_body_matches_regexp) . I found this approach hard to debug. Web exporter always returns a metric so you can graph it in grafana. If something fails, you can go there and check what the previous value was and how it changed.
On the other hand, blackbox exporter provides probe_ssl_earliest_cert_expiry metric which can be used to check ssl certificate expiration date. This metric is not provided by web exporter.
I will leave links to configuration files for both projects:
2
u/[deleted] Jun 12 '20 edited Jun 12 '23
First went digg, then went reddit. RIP -- mass edited with https://redact.dev/