# Setting up a monitoring stack for Boost

## Background <a href="#docs-internal-guid-09f21b17-7fff-fabd-2034-91b1f0465aa1" id="docs-internal-guid-09f21b17-7fff-fabd-2034-91b1f0465aa1"></a>

The monitoring stack we will use includes:

* Prometheus - collects metrics and powers dashboards in Grafana&#x20;
* Tempo - collects traces and powers traces search in Grafana with Jaeger
* Grafana - provides visualization tools and dashboards for all metrics and traces

Lotus and Boost are already instrumented to produce traces and stats for Prometheus to collect.

The Boost team also packages a set of Grafana dashboards that are automatically provisioned as part of this setup.

## Prerequisites

This setup has been tested on macOS and on Linux. We haven’t tested it on Windows, so YMMV.

All the monitoring stack containers run in Docker.

## Steps

1. ### Install Docker

We have tested this setup with Docker 20.10.23 on macOS and Ubuntu.

<https://docs.docker.com/engine/install/>

2. ### DNS resolution for Prometheus

Update `extra_hosts` in `docker-compose.yaml` for `prometheus`, so that the Prometheus container can reach all its targets - `boostd`, `lotus-miner`, `booster-bitswap`, `booster-http`, etc.\
<https://github.com/filecoin-project/boost/blob/main/docker/monitoring/docker-compose.yaml#L47-L55>

Depending on where your Filecoin processes (`boostd`, `lotus`, `lotus-miner`, `booster-bitswap`, etc.) are running, you need to confirm that they are reachable from Prometheus so that it can scrape their metrics.

By default the setup expects to find them within the same Docker network, so if you are running them elsewhere (i.e. on the \`host\` network), add the following arguments:

3. ### Prometheus targets

Confirm that Prometheus targets are scraped at <http://localhost:9090> / Targets

![](https://lh4.googleusercontent.com/sUGTMb0S5lp2sog0DdG9ecSRmCPDtMSmyAIwQ-k-91Pw1IUahhCiudKXkmKUJTHajXrPMR6RGLMmFEU9szwRlvcf9B4DgAIBuAaLTPB7-XaGPvtCrg2A9XGdhDIaTxZYi5wdbpTLdpsC98YcrorNVA2R1K7NLlK2xlk6RJRZ0jJ6qZ28QW543N0Imsrbzg)

If you are running software firewall like \`ufw\`, you might need to modify your iptables and allow access from the Prometheus container / network to the Filecoin stack network, for example:

`sudo docker network inspect monitoring`\
`# note the Subnet for the network`\
`sudo ufw allow from 172.18.0.0/16`

4. ### Grafana dashboards

Go to Grafana at <http://localhost:3333> and inspect the dashboards:

![](https://lh4.googleusercontent.com/Uat6-bsTHiMvzwm854YT2W9M7fN5uiqdvQ8oFs1WsWqn98716AO56VCWD8Pok98W019mrjZVRM6fFv2qZ_hY18OR0GmCMa5eVR45mh0OT8ZbX47HT3_lLhuEvNt3CRy9eJ-t2O0De2hf3UDOsYERCgSaDR_atH9czc1gkdUbo6dDC5ZYP75xaLJugAo8VQ)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boost.filecoin.io/v1/tutorials/setting-up-a-monitoring-stack-for-boost.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
