What is Prometheus Blackbox Exporter?
Prometheus provides a wide variety of exporters to expose metrics according to different use cases. Blackbox Exporter is one of the most commonly used metrics exporters of Prometheus. Blackbox Exporter can be used to expose metrics related to the endpoints which we need to monitor. This is an official exporter of Prometheus written in the Go programming language.
Blackbox Exporter allows probing of endpoints over HTTP, HTTPS, DNS, TCS, and ICMP.
- If you have not yet installed Prometheus, please follow Setup Prometheus for Monitoring to get started.
- If you want to install and configure other Prometheus exporters, please follow Prometheus Exporters.
Today's Agenda
In
this post, we will learn how to install Prometheus Blackbox Exporter to monitor crucial endpoints of our application. We will probe these endpoints on the basis of their status codes.
Prerequisite
This post has been prepared for the audience who :
- Have access to a Linux-based system although the steps are almost similar in other platforms like CentOS or MacOS.
- Have a basic understanding of Linux based systems and their commands.
- Have Prometheus installed already to which we will add the exporter configuration. If not already done, please follow Setup Prometheus for Monitoring.
Let's get started
Run the below shell script with the root user on the server. You will see Blackbox Exporter running as a service on port 9115 in your machine.
Note: You can update the version of Blackbox Exporter in the shell script in shaded regions.
Please follow our post Configure Exporters in Prometheus to understand how to connect Blackbox Exporter with Prometheus to start getting the system metrics.
You can also create a new user for Blackbox Exporter to make the necessary changes in the script.
If you want to know how you can create a new user in Linux, please go through our post on Setup Prometheus for Monitoring posts and follow Step 1 of the post.
Finally, run the below command to check if Blackbox Exporter has started exposing the system metrics at port 9115.
![]() |
Blackbox Exporter running on port 9115 |
Comments
Post a Comment