Hi Sean, First of all, are you indeed running both the Blackbox Exporter and the Grafana Agent on the same host? Also, are you running both directly on the host, or in containers? If the agent is running in a container with its own network namespace, it won't see the Blackbox Exporter on the same "localhost", and you'll need to use the host's IP or host name (as reachable from within a container) instead.
Julius On Tue, Jan 10, 2023 at 9:30 AM Sean Coh <[email protected]> wrote: > Hi, > > I'm trying to test blackbox exporter with https prob. I'm fairly new to > prometheus and grafana so I have been going over resources here. > https://prometheus.io/docs/guides/multi-target-exporter/ > > Does localhost need to be changed to a specific host name? Keep getting > site can't be reached. > > Code from grafana_agent.yml: > > scrape_configs: > - job_name: 'blackbox' > metrics_path: /probe > params: > module: [https_2xx] > static_configs: > - targets: > - https://www.google.com/ > relabel_configs: > - source_labels: [__address__] > target_label: __param_target > - source_labels: [__param_target] > target_label: instance > - target_label: __address__ > replacement: localhost:9115 > > > Logs error: component="scrape manager" scrape_pool=blackbox target=" > http://localhost:9115/probe?module=https_2xx&target=https%3A%2F%2Fwww.google.com%2F" > msg="Scrape failed" err="Get \" > http://localhost:9115/probe?module=https_2xx&target=https%3A%2F%2Fwww.google.com%2F\ > <http://localhost:9115/probe?module=https_2xx&target=https%3A%2F%2Fwww.google.com%2F%5C>": > dial tcp localhost:9115: connect: connection refused" > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/1fd348a1-95ad-4403-8595-10480d216b3an%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/1fd348a1-95ad-4403-8595-10480d216b3an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Julius Volz PromLabs - promlabs.com -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAObpH5zaBRhJydfXfY2jWhN2rwZbewATmGS5ZAuAXL6YKkGNpg%40mail.gmail.com.

