Skip to content

Commit 9c1997e

Browse files
committed
Add PowerShell example, link to Docker Metrics script
1 parent 10e5e8a commit 9c1997e

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

prometheus/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
# prometheus
22
[![This image on DockerHub](https://img.shields.io/docker/pulls/stefanscherer/prometheus-windows.svg)](https://hub.docker.com/r/stefanscherer/prometheus-windows/)
33

4+
# PowerShell
5+
6+
The command line options with a dot need to be quoted in PowerShell:
7+
8+
```powershell
9+
mkdir C:\prom
10+
copy prometheus.yml C:\prom\prometheus.yml
11+
docker container run -d -p 9090:9090 `
12+
-v "C:\prom\data:C:\prometheus" -v "C:\prom:C:\config" `
13+
stefanscherer/prometheus-windows '-config.file=/config/prom.yml' `
14+
'-storage.local.path=/prometheus' `
15+
'-web.console.libraries=/etc/prometheus/console_libraries' `
16+
'-web.console.templates=/etc/prometheus/consoles'
417
```
18+
19+
# bash
20+
21+
From my Mac:
22+
23+
```bash
524
$ mkdir -p data
625
$ docker run -d -p 9090:9090 \
726
-v C:$(pwd)/data:C:/prometheus -v C:$(pwd):C:/config \
@@ -13,3 +32,5 @@ $ open http://$(docker-machine ip windows):9090
1332
```
1433

1534
See the [Getting started](https://prometheus.io/docs/introduction/getting_started/) guide to learn more about Prometheus.
35+
36+
See the script [start-prometheus.ps1](https://github.com/StefanScherer/docker-windows-box/blob/master/scripts/prometheus/start-prometheus.ps1) and [prom.yml](https://github.com/StefanScherer/docker-windows-box/blob/master/scripts/prometheus/prom.yml) to activate the Docker Metrics API and run Prometheus collecting it.

0 commit comments

Comments
 (0)