...
Expand |
---|
Blackbox ExporterBlackbox exporter is a prometheus exporter which can probe endpoints via http/https, icmp, etc. It's extremely simple to setup and can be used to monitor the status of various endpoints (which could be web applications, REST endpoints, etc.). We've already setup Node_Exporternode_exporter is a prometheus exporter which monitors hardware and 'nix OS metrics. It runs on a port exposed to prometheus and prometheus can then query it and get a (large) ranger of metrics for whatever machine is running node_exporter. GrafanaGrafana is a great platform for visualising data and metrics from large data sets. It can connect with a very large number of data sources and has native (built-in) prometheus support, which makes it extremely easy to integrate prometheus and provides an attractive and versatile front-end to view various prometheus metrics. |
...
- blackbox-exporter.yml : configuration file for blackbox-exporter
- dashboard-blackbox.json : blackbox exporter dashboard I've customised see Adding monitoring dashboards;
- dashboard-node_exporter.json : node_exporter dashboard I've customised see Adding monitoring dashboards;
- docker-compose.yml : docker compose config file
- grafana.ini : grafana configuration file
- prometheus.yml : prometheus configuration file
Once you've cloned the repo, simply run (from the with within the cloned folder):
Code Block |
---|
docker-compose up -d |
...
Installing node_exporter can be done by downloading a recent version version, untar'ing and executing. We're going to be doing an extra step here to manage node_exporter with systemd (so it starts on server boot etc.).
...
We've already setup node_exporter in our prometheus configuration file (see lines 31 to 34).
View Git file | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Once you have your docker containers running, access port 3000 on the server with a browser (e.g. visit httpvisit http://192.168.0.1:3000 or whatever your internal address is for your server).
Info |
---|
For external network access you should (shall!) secure client-server comms. See Apache reverse-proxy SSL to multiple server applications for a nice(?) way to do this for our setup here. |
Grafana's login screen should appear - if you're the first user to login after creating this container then just enter any new credentials.
...
You can leave most setting as default and simply enter the server url docker-compose defined prom hostname with port 9090
for the Prometheus instance we have setup, for my case it looks like:
Info |
---|
|
Warning |
The URL should point to the server's internal IP and NOT localhost (or 127.0.0.1) since |
Anchor | ||||
---|---|---|---|---|
|
...