Skip to content

Commit 93a8f4c

Browse files
committed
Add README
1 parent 6c44c37 commit 93a8f4c

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

prometheus/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
data/

prometheus/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# prometheus
2+
[![This image on DockerHub](https://img.shields.io/docker/pulls/stefanscherer/prometheus-windows.svg)](https://hub.docker.com/r/stefanscherer/prometheus-windows/)
3+
4+
5+
```
6+
$ mkdir -p data
7+
$ docker run -d -p 9090:9090 \
8+
-v C:$(pwd)/data:C:/prometheus -v C:$(pwd):C:/config
9+
prometheus -config.file=/config/prometheus.yml \
10+
-storage.local.path=/prometheus \
11+
-web.console.libraries=/etc/prometheus/console_libraries \
12+
-web.console.templates=/etc/prometheus/consoles
13+
$ open http://$(docker-machine ip windows):9090
14+
```
15+
16+
See the [Getting started](https://prometheus.io/docs/introduction/getting_started/) guide to learn more about Prometheus.

prometheus/prometheus.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
global:
2+
scrape_interval: 15s # By default, scrape targets every 15 seconds.
3+
4+
# Attach these labels to any time series or alerts when communicating with
5+
# external systems (federation, remote storage, Alertmanager).
6+
external_labels:
7+
monitor: 'codelab-monitor'
8+
9+
# A scrape configuration containing exactly one endpoint to scrape:
10+
# Here it's Prometheus itself.
11+
scrape_configs:
12+
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
13+
- job_name: 'prometheus'
14+
15+
# Override the global default and scrape targets from this job every 5 seconds.
16+
scrape_interval: 5s
17+
18+
static_configs:
19+
- targets: ['localhost:9090']

0 commit comments

Comments
 (0)