Prometheus: Update devenv block without a version to the latest version (#32847)

* Change default prometheus to latest and prometheus v1 to prometheus1

* Update README

* Remove prometheus1 block as not used
This commit is contained in:
Ivana Huckova 2021-04-13 15:12:48 +02:00 committed by GitHub
parent 4f3b3b12be
commit a0c38e243c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 11 additions and 90 deletions

View File

@ -26,11 +26,10 @@ found. The dashboards are located in the `devenv/dev-dashboards` folder.
This command creates a docker-compose file with specified databases configured and ready to run. Each database has
a prepared image with some fake data ready to use. For available databases, see `docker/blocks` directory. Notice that
for some databases there are multiple images, for example there is prometheus_mac specifically for Macs or different
version.
for some databases there are multiple images with different versions. Some blocks such as `slow_proxy_mac` or `apache_proxy_mac` are specifically for Macs.
```bash
make devenv sources=influxdb,prometheus2,elastic5
make devenv sources=influxdb,prometheus,elastic5
```
Some of the blocks support dynamic change of the image version used in the Docker file. The signature looks like this:

View File

@ -1,3 +1,4 @@
FROM prom/prometheus:v1.8.2
FROM prom/prometheus:latest
ADD prometheus.yml /etc/prometheus/
ADD alert.rules /etc/prometheus/
ADD recording.yml /etc/prometheus/
ADD alert.yml /etc/prometheus/

View File

@ -1,10 +0,0 @@
# Alert Rules
ALERT AppCrash
IF process_open_fds > 0
FOR 15s
LABELS { severity="critical" }
ANNOTATIONS {
summary = "Number of open fds > 0",
description = "Just testing"
}

View File

@ -2,6 +2,8 @@
build: docker/blocks/prometheus
ports:
- "9090:9090"
extra_hosts:
- "host.docker.internal:host-gateway"
node_exporter:
image: prom/node-exporter

View File

@ -6,9 +6,9 @@ global:
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "alert.rules"
# - "first.rules"
# - "second.rules"
- "alert.yml"
- "recording.yml"
# - "second.rules"
alerting:
alertmanagers:
@ -32,7 +32,7 @@ scrape_configs:
- job_name: 'grafana'
static_configs:
- targets: ['localhost:3000']
- targets: ['host.docker.internal:3000']
- job_name: 'prometheus-random-data'
static_configs:

View File

@ -1,4 +0,0 @@
FROM prom/prometheus:latest
ADD prometheus.yml /etc/prometheus/
ADD recording.yml /etc/prometheus/
ADD alert.yml /etc/prometheus/

View File

@ -1,28 +0,0 @@
prometheus:
build: docker/blocks/prometheus2
ports:
- "9090:9090"
extra_hosts:
- "host.docker.internal:host-gateway"
node_exporter:
image: prom/node-exporter
ports:
- "9100:9100"
fake-prometheus-data:
image: grafana/fake-data-gen
ports:
- "9091:9091"
environment:
FD_DATASOURCE: prom
alertmanager:
image: quay.io/prometheus/alertmanager
ports:
- "9093:9093"
prometheus-random-data:
build: docker/blocks/prometheus_random_data
ports:
- "8081:8080"

View File

@ -1,39 +0,0 @@
# my global config
global:
scrape_interval: 10s # By default, scrape targets every 15 seconds.
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "alert.yml"
- "recording.yml"
# - "second.rules"
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- "alertmanager:9093"
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
static_configs:
- targets: ['node_exporter:9100']
- job_name: 'fake-data-gen'
static_configs:
- targets: ['fake-prometheus-data:9091']
- job_name: 'grafana'
static_configs:
- targets: ['host.docker.internal:3000']
- job_name: 'prometheus-random-data'
static_configs:
- targets: ['prometheus-random-data:8080']