Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: prometheus howto #699

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs/prometheus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Prometheus howto

Create a `prometheus.yml` file:

```
scrape_configs:
- job_name: myapp
scrape_interval: 10s
static_configs:
- targets:
- 172.18.0.2:8888
- 172.18.0.3:8888
- 172.18.0.4:8888
- 172.18.0.6:8888
```

Replace the IP addrs under `targets` to the actual IP addrs of the worker nodes
in the cluster.


Run the prometheus container:


```bash
docker run --network host -p 9090:9090 -v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus &
```


Point browser to the IP addr of the node where prometheus is running:

```
http://<prometheus node IP addr>:9090
```


Another simple test to see if prometheus is working:


```bash
$ curl http://<worker node IP addr>:8888/metrics
```
Loading