Skip to content

Commit 7b07000

Browse files
Update content/guides/go-prometheus-monitoring/compose.md
Co-authored-by: Craig Osterhout <[email protected]>
1 parent bea92d1 commit 7b07000

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/guides/go-prometheus-monitoring/compose.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ The Docker Compose file consists of three services:
8686
static_configs:
8787
- targets: ["api:8000"]
8888
```
89-
In the `prometheus.yml` file, we have defined a job named `myapp` to scrape the metrics from the Golang application. The `targets` field specifies the target to scrape the metrics from. In this case, the target is the Golang application running on port `8000`. The `api` is the service name of the Golang application in the Docker Compose file. The Prometheus server will scrape the metrics from the Golang application every 10 seconds.
89+
90+
In the `prometheus.yml` file, you have defined a job named `myapp` to scrape the metrics from the Golang application. The `targets` field specifies the target to scrape the metrics from. In this case, the target is the Golang application running on port `8000`. The `api` is the service name of the Golang application in the Docker Compose file. The Prometheus server will scrape the metrics from the Golang application every 10 seconds.
9091

9192
- **Grafana service**: This service runs the Grafana server in a container. It uses the official Grafana image `grafana/grafana:11.3.0`. It exposes the Grafana server on port `3000` and connects to the `go-network` network. You have also mounted the `grafana.yml` file from the `Docker` directory which is present in the root directory of your project. The `grafana.yml` file contains the Grafana configuration to add the Prometheus data source. This is how you connect the Grafana server to the Prometheus server. In the environment variables, you have set the Grafana admin user and password, which will be used to log in to the Grafana dashboard.
9293

0 commit comments

Comments
 (0)