refaarea.blogg.se

Prometheus blackbox exporter
Prometheus blackbox exporter









prometheus blackbox exporter

Unlike nagios: this only sends a single ping.

#Prometheus blackbox exporter plus

The response should include probe_success 1 if the remote host responded, plus metrics for the time taken for the DNS query and the time taken for the overall probe. curl 'localhost:9115/probe?target=&module=ping4' You will need to quote the URL because it contains the special & character. You need to provide two arguments: the module, and the target (hostname or address to test). If there are any errors, then go back and fix them. Use cursor keys to move around the journalctl log output, and “q” to quit. Journalctl -eu blackbox_exporter # check for "Listening on address" address=127.0.0.1:9115 Systemctl start blackbox_exporter # start now Now start blackbox_exporter: systemctl enable blackbox_exporter # start on future boots There is a sample configuration in /opt/blackbox_exporter/blackbox.yml but we will create one from scratch.Ĭreate /etc/prometheus/blackbox.yml with the following contents: modules: Tell systemd to read this new file: systemctl daemon-reloadĪlso create an options file /etc/default/blackbox_exporter with the following contents: OPTIONS='-web.listen-address=127.0.0.1:9115 -config.file=/etc/prometheus/blackbox.yml' 2 Start blackbox_exporter Use a text editor to create a systemd unit file /etc/systemd/system/blackbox_rvice with the following contents: ĮnvironmentFile=/etc/default/blackbox_exporterĮxecStart=/opt/blackbox_exporter/blackbox_exporter $OPTIONS

prometheus blackbox exporter prometheus blackbox exporter

Ln -s blackbox_exporter-X.Y.Z.linux-amd64 /opt/blackbox_exporter Tar -C /opt -xvzf blackbox_exporter-X.Y.Z. (If blackbox_exporter is pre-installed, skip to the next section “Start blackbox_exporter”)įetch and unpack the latest release from the releases page and create a symlink so that /opt/blackbox_exporter refers to the current version. You then scrape blackbox_exporter from prometheus, and each scrape triggers a check. You run the blackbox_exporter at the place where the checks should originate - this can be on your prometheus server (although it doesn’t have to be). The setup is somewhat like snmp_exporter. Prometheus can perform Nagios-like “blackbox” service testing - such as pings, http queries and DNS checks - using the blackbox_exporter.











Prometheus blackbox exporter