Yes, you need to run blackbox_exporter separately (it will be listening on port 9115, and prometheus/grafana agent will talk to this).
To run the blackbox_exporter under macOS, after you've got the error message, go to System Preferences > Security & Privacy > General and click "Allow anyway". Then run it again. On Tuesday, 10 January 2023 at 16:57:53 UTC [email protected] wrote: > Well I have only ran Grafana Agent using the command line ``nohup > ./grafana_agent --config.file=grafana_agent.yml &``. Which runs correctly > and I can view the log output on > > ``less nohup.out``. I tried running nohup with the > blackbox_exporter/blackbox.yml but it keeps giving me an error > *“blackbox_exporter” > cannot be opened because the developer cannot be verified. (*Note: I'm on > a Mac). I did manage to find a resource where it stated the > blackbox_exporter file needs to be copied so it can be run. > https://shishirkh.medium.com/monitoring-stack-setup-part-4-blackbox-exporter-f7ba54d0ed99. > > Would I also need to run blackbox on its own service for me to be able to > scrape the metrics in grafana? > > > Thanks, > > Sean > > On Tue, Jan 10, 2023 at 3:42 AM Julius Volz <[email protected]> wrote: > >> 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/510a6449-8c8d-4632-842e-f7fb1da50748n%40googlegroups.com.

