Blackbox Exporter guide#1134
Blackbox Exporter guide#1134lucperkins wants to merge 1 commit intoprometheus:masterfrom lucperkins:lperkins/blackbox-exporter-guide
Conversation
Signed-off-by: lucperkins <lucperkins@gmail.com>
|
Friendly ping on this. Currently ready for review. |
|
I likely won't get to this until Tuesday. One initial comment is that building out a custom Python app including a full framework is unnecessary. Use what you have already, such as the node exporter. |
| method: GET | ||
| ``` | ||
|
|
||
| With this configuration, the Blackbox Exporter will use the built-in `http_2xx` module, which periodically probes HTTP endpoints (the interval is set in your Prometheus configuration). |
There was a problem hiding this comment.
"the built-in http_2xx module" -> The name http_2xx is actually arbitary and user-chosen in the configuration, so there's no built-in module http_2xx. It would be more correct to say that this configuration defines a http_2xx module that uses the built-in http prober.
| ## Installing and running the Node Exporter | ||
|
|
||
| The Prometheus Node Exporter is a single static binary that you can install [via tarball](#tarball-installation). Once you've downloaded it from the Prometheus [downloads page](/download#node_exporter) extract it, and run it: | ||
| The Prometheus Node Exporter is a single static binary that you can install via tarball. Once you've downloaded it from the Prometheus [downloads page](/download#node_exporter) extract it, and run it: |
There was a problem hiding this comment.
It seems like this is an unrelated change that made it into this PR?
There was a problem hiding this comment.
It's an unrelated change but I felt it was small enough to include here (it fixes a broken link). I can put it in a separate PR if you'd like.
|
|
@juliusv I do like the simplicity of probing a public target like that. I'll push a new draft that takes that approach and we'll see what Richie and Brian have to say 😄 |
|
The risk with public targets is that the content may change, or we could be limited by anti-abuse stuff. You will also run into v6 issues on all those endpoints. Something local is safest. |
| module: [http_2xx] | ||
| static_configs: | ||
| - targets: | ||
| - localhost:2112/health |
There was a problem hiding this comment.
It'd be safest to quote this, it's less likely the user will have issues later as they adjust it
| replacement: localhost:9115 | ||
| ``` | ||
|
|
||
| This instructs Prometheus to scrape the Blackbox Exporter's `/probe` endpoint and passes the `targets` list, which includes the Python web server running on port 2112, to the Blackbox Exporter. With this configuration in place, start Prometheus: |
There was a problem hiding this comment.
target is a single item
|
|
||
| ## Installing, configuring, and running the Blackbox Exporter | ||
|
|
||
| Like Prometheus, the Blackbox Exporter is a single static binary that you can install via tarball. [Download the latest release](/download#blackbox_exporter) for your platform and untar it: |
There was a problem hiding this comment.
I'd setup and play with the blackbox exporter first, then talk about Prometheus
| cd blackbox_exporter-*.*-amd64 | ||
| ``` | ||
|
|
||
| The untarred folder contains a `blackbox.yml` file for configuring the exporter. Delete the current contents and replace it with this: |
There was a problem hiding this comment.
This is already the default, what is the benefit of the user changing this?
|
|
||
| With this configuration, the Blackbox Exporter will use the built-in `http_2xx` module, which periodically probes HTTP endpoints (the interval is set in your Prometheus configuration). | ||
|
|
||
| NOTE: In the Blackbox Exporter configuration, you don't need to specify host or port information for the specific endpoints that you want to probe, only which modules you'd like to use. Host and port information is specifed in the [Prometheus configuration](#prometheus-configuration). |
There was a problem hiding this comment.
They're targets, not host:port. HTTP can have more, icmp is just host.
| `http_2xx` | `localhost:2112/health` | Success | Logs | ||
| `http_2xx` | `localhost:2112/health` | Success | Logs | ||
|
|
||
| In the Prometheus [expression browser](/docs/visualization/browser), accessible at http://localhost:9090/graph, you can a variety of Blackbox-Exporter-specific metrics, which have the `probe_` prefix, for example, the [`probe_success{instance="localhost:2112/health",job="blackbox"}`](http://localhost:9090/graph?g0.range_input=1h&g0.expr=probe_success{instance%3D%localhost%3A2112%2Fhealth%22}), which indicates whether the most recent probe was successful. |
There was a problem hiding this comment.
You need to talk more about probe_success, many users miss the importance of this
Maybe setup an alert?
I'd also mention the debug URL parameter.
…#1134) Description for shared block cache was added in prometheus#1114, but it fail to mention the change is for 3.0 only.
|
@lucperkins Are you still interested by this? |
|
@roidelapluie I'm no longer with the CNCF, so it's unlikely that I will ever complete this. |
|
@lucperkins Can I take over your branch and take it to the finish line? |
|
@roidelapluie Absolutely! You have my full endorsement 💯 |
cc @brian-brazil @juliusv @RichiH
This is now ready for review.