mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
docker: add prometheus/example-golang-random to docker-compose blocks
This commit is contained in:
parent
759e05d09e
commit
425d2cfd3a
@ -23,3 +23,9 @@
|
|||||||
network_mode: host
|
network_mode: host
|
||||||
ports:
|
ports:
|
||||||
- "9093:9093"
|
- "9093:9093"
|
||||||
|
|
||||||
|
prometheus-random-data:
|
||||||
|
build: blocks/prometheus_random_data
|
||||||
|
network_mode: host
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
@ -25,11 +25,15 @@ scrape_configs:
|
|||||||
- job_name: 'node_exporter'
|
- job_name: 'node_exporter'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['127.0.0.1:9100']
|
- targets: ['127.0.0.1:9100']
|
||||||
|
|
||||||
- job_name: 'fake-data-gen'
|
- job_name: 'fake-data-gen'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['127.0.0.1:9091']
|
- targets: ['127.0.0.1:9091']
|
||||||
|
|
||||||
- job_name: 'grafana'
|
- job_name: 'grafana'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['127.0.0.1:3000']
|
- targets: ['127.0.0.1:3000']
|
||||||
|
|
||||||
|
- job_name: 'prometheus-random-data'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['127.0.0.1:8080']
|
||||||
|
@ -23,3 +23,9 @@
|
|||||||
network_mode: host
|
network_mode: host
|
||||||
ports:
|
ports:
|
||||||
- "9093:9093"
|
- "9093:9093"
|
||||||
|
|
||||||
|
prometheus-random-data:
|
||||||
|
build: blocks/prometheus_random_data
|
||||||
|
network_mode: host
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
@ -25,11 +25,15 @@ scrape_configs:
|
|||||||
- job_name: 'node_exporter'
|
- job_name: 'node_exporter'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['127.0.0.1:9100']
|
- targets: ['127.0.0.1:9100']
|
||||||
|
|
||||||
- job_name: 'fake-data-gen'
|
- job_name: 'fake-data-gen'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['127.0.0.1:9091']
|
- targets: ['127.0.0.1:9091']
|
||||||
|
|
||||||
- job_name: 'grafana'
|
- job_name: 'grafana'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['127.0.0.1:3000']
|
- targets: ['127.0.0.1:3000']
|
||||||
|
|
||||||
|
- job_name: 'prometheus-random-data'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['127.0.0.1:8080']
|
||||||
|
18
docker/blocks/prometheus_random_data/Dockerfile
Normal file
18
docker/blocks/prometheus_random_data/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# This Dockerfile builds an image for a client_golang example.
|
||||||
|
|
||||||
|
# Builder image, where we build the example.
|
||||||
|
FROM golang:1.9.0 AS builder
|
||||||
|
# Download prometheus/client_golang/examples/random first
|
||||||
|
RUN go get github.com/prometheus/client_golang/examples/random
|
||||||
|
WORKDIR /go/src/github.com/prometheus/client_golang
|
||||||
|
WORKDIR /go/src/github.com/prometheus/client_golang/prometheus
|
||||||
|
RUN go get -d
|
||||||
|
WORKDIR /go/src/github.com/prometheus/client_golang/examples/random
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
|
||||||
|
|
||||||
|
# Final image.
|
||||||
|
FROM scratch
|
||||||
|
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
|
||||||
|
COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random .
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["/random"]
|
Loading…
Reference in New Issue
Block a user