demo: Add prometheus server configuration

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2017-04-16 15:48:28 -05:00 committed by Rolf Neugebauer
parent c854d58ca4
commit 238436616d
8 changed files with 115 additions and 0 deletions

1
projects/demo/prom/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/data

View File

@ -0,0 +1,2 @@
FROM prom/prometheus
ADD prometheus.yml /etc/prometheus/

View File

@ -0,0 +1,2 @@
FROM prom/prometheus:v1.6.0
ADD prometheus-us-central.yml /etc/prometheus/prometheus.yml

View File

@ -0,0 +1,3 @@
#! /bin/sh
docker build -t moby/prom-us-central1-f -f Dockerfile.us-central1-f .

View File

@ -0,0 +1,62 @@
kernel:
image: "mobylinux/kernel:4.9.x"
cmdline: "console=ttyS0 page_poison=1"
init:
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
- mobylinux/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
- mobylinux/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
- mobylinux/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
onboot:
- name: sysctl
image: "linuxkit/sysctl:1f5ec5d5e6f7a7a1b3d2ff9dd9e36fd6fb14756a"
net: host
pid: host
ipc: host
capabilities:
- CAP_SYS_ADMIN
readonly: true
- name: dhcpcd
image: "linuxkit/dhcpcd:48e249ebef6a521eed886b3bce032db69fbb4afa"
binds:
- /var:/var
- /tmp/etc:/etc
capabilities:
- CAP_NET_ADMIN
- CAP_NET_BIND_SERVICE
- CAP_NET_RAW
net: host
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: "linuxkit/metadata:c5567e65e9125f0a4c4b8cb9d56a86377be62652"
binds:
- /dev:/dev
- /var:/var
- /tmp/etc/resolv.conf:/etc/resolv.conf
net: host
capabilities:
- CAP_SYS_ADMIN
services:
- name: rngd
image: "mobylinux/rngd:3dad6dd43270fa632ac031e99d1947f20b22eec9"
capabilities:
- CAP_SYS_ADMIN
oomScoreAdj: -800
readonly: true
- name: prometheus
image: "moby/prom-us-central1-f"
binds:
- /dev:/dev
- /var/lib/misc:/data
capabilities:
- all
net: host
trust:
image:
- mobylinux/kernel
outputs:
- format: kernel+initrd
- format: gcp
project: docker4x
bucket: rolf
family: moby-demo
replace: true

View File

@ -0,0 +1,19 @@
global:
scrape_configs:
# - job_name: 'prometheus'
# scrape_interval: 20s
# static_configs:
# - targets: ['localhost:9090']
# Scrape the Node Exporter
- job_name: 'node'
scrape_interval: 20s
static_configs:
- targets: ['localhost:9100', 'localhost:9101', 'localhost:9102', 'localhost:9103', 'localhost:9104']
# # Scrape the containerd exporter
# - job_name: 'containerd'
# scrape_interval: 15s
# static_configs:
# - targets: ['192.168.65.200:13337', '192.168.65.201:13337', '192.168.65.202:13337', '192.168.65.203:13337', '192.168.65.204:13337']

View File

@ -0,0 +1,13 @@
global:
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 20s
static_configs:
- targets: ['localhost:9090']
# Scrape the Node Exporter
- job_name: 'node'
scrape_interval: 20s
static_configs:
- targets: ['10.128.0.200:9100', '10.128.0.201:9100', '10.128.0.202:9100', '10.128.0.203:9100', '10.128.0.204:9100']

View File

@ -0,0 +1,13 @@
global:
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 20s
static_configs:
- targets: ['localhost:9090']
# Scrape the Node Exporter
- job_name: 'node'
scrape_interval: 20s
static_configs:
- targets: ['10.128.0.200:9100', '10.128.0.201:9100', '10.128.0.202:9100', '10.128.0.203:9100', '10.128.0.204:9100']