GitHub - prometheus/blackbox_exporter: Blackbox prober exporter
source link: https://github.com/prometheus/blackbox_exporter
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Blackbox exporter
The blackbox exporter allows blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP.
Running this software
From binaries
Download the most suitable binary from the releases tab
Then:
./blackbox_exporter <flags>
Using the docker image
Note: You may want to enable ipv6 in your docker configuration
docker run --rm -d -p 9115:9115 --name blackbox_exporter -v `pwd`:/config prom/blackbox-exporter:master --config.file=/config/blackbox.yml
Checking the results
Visiting http://localhost:9115/probe?target=google.com&module=http_2xx
will return metrics for a HTTP probe against google.com. The probe_success
metric indicates if the probe succeeded. Adding a debug=true
parameter
will return debug information for that probe.
Building the software
Local Build
make
Building with Docker
After a successful local build:
docker build -t blackbox_exporter .
Configuration
Blackbox exporter is configured via a configuration file and command-line flags (such as what configuration file to load, what port to listen on, and the logging format and level).
Blackbox exporter can reload its configuration file at runtime. If the new configuration is not well-formed, the changes will not be applied.
A configuration reload is triggered by sending a SIGHUP
to the Blackbox exporter process or by sending a HTTP POST request to the /-/reload
endpoint.
To view all available command-line flags, run ./blackbox_exporter -h
.
To specify which configuration file to load, use the --config.file
flag.
Additionally, an example configuration is also available.
HTTP, HTTPS (via the http
prober), DNS, TCP socket and ICMP (see permissions section) are currently supported.
Additional modules can be defined to meet your needs.
The timeout of each probe is automatically determined from the scrape_timeout
in the Prometheus config, slightly reduced to allow for network delays.
This can be further limited by the timeout
in the Blackbox exporter config file. If neither is specified, it defaults to 10 seconds.
Prometheus Configuration
The blackbox exporter needs to be passed the target as a parameter, this can be done with relabelling.
Example config:
scrape_configs: - job_name: 'blackbox' metrics_path: /probe params: module: [http_2xx] # Look for a HTTP 200 response. static_configs: - targets: - http://prometheus.io # Target to probe with http. - https://prometheus.io # Target to probe with https. - http://example.com:8080 # Target to probe with http on port 8080. relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 127.0.0.1:9115 # The blackbox exporter's real hostname:port.
Permissions
The ICMP probe requires elevated privileges to function:
- Windows: Administrator privileges are required.
- Linux: root user or
CAP_NET_RAW
capability is required.- Can be set by executing
setcap cap_net_raw+ep blackbox_exporter
- Can be set by executing
- BSD / OS X: root user is required.
Recommend
-
155
-
117
README.md Prometheus SNMP Exporter This is an exporter that exposes information gathered from SNMP for use by the Prometheus monitoring system. ...
-
61
README.md MySQL Server Exporter
-
35
Prometheus 监控分为两种: 白盒监控 墨盒监控 白盒监控 :是指我们日常监控主机的资源用量、容器的运行状态、数据库中间件的运行数据。 这些都是支持业务和服务的基础设施,通过白...
-
4
Hair Today Gone Tomorrow: Four Men Go To Fix A Wafer Prober I’ve had a fairly varied early part of my career in the semiconductors business: a series of events caused me to jump disciplines a little bit, and after...
-
2
Prometheus监控之Blackbox_exporter 精选 原创 Bla...
-
6
kubelet 使用 livenessProbe 存活探针来确定什么时候要重启容器, 使用 readinessProbe 就绪探针可以确认是否要把流量接入到 service 里, startupProbe 启动探针是为了避免在启动时间不可控时, 使用 liveness 探针探测失败, 造成重启的死循环的场景. 探针参数...
-
5
监控域名和 URL 是可观察性的一个重要方面,主要用于诊断可用性问题。接下来会详细介绍如何使用 Blackbox Exporter 和 Prometheus 在 Kubernetes 中实现 URL 监控。 Blackbox Exporter 简介 Blackbox Exporter 是 Prome...
-
3
Contents observability.sh This script will handle the automated install of a basic monitoring stack on OpenShift utilizing Prometheus, Grafana, and Blackbox Exporter. The script will do the following: Crea...
-
7
黑盒监控blackbox_exporter 前边介绍有很多exporter可以直接将metrics暴露给Prometheus进行监控,这些称为“白盒监控”,那些exporter无法监控到的指标呢?或者未暴露Metrics给Prometheus的一些服务怎么办?这时就要用到 blackbox_...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK