[#16] dev-env: Add prometheus

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-10 09:40:33 +03:00
parent 69cbe189cb
commit dca6ff620a
8 changed files with 55 additions and 1 deletions

View file

@ -3,3 +3,4 @@
basenet basenet
morph_chain morph_chain
jaeger jaeger
prometheus

4
.env
View file

@ -56,3 +56,7 @@ FROSTFS_CONTRACTS_URL=https://http.t5.fs.neo.org/AQgse8bPCZx4zScMuAKxowJdZPbKHp8
# Jaeger tracing # Jaeger tracing
JAEGER_VERSION=1.42.0 JAEGER_VERSION=1.42.0
JAEGER_IMAGE=jaegertracing/all-in-one JAEGER_IMAGE=jaegertracing/all-in-one
# Prometheus monitoring
PROMETHEUS_VERSION=v2.43.0
PROMETHEUS_IMAGE=prom/prometheus

1
services/prometheus/.env Symbolic link
View file

@ -0,0 +1 @@
../../.env

View file

@ -0,0 +1 @@
IPV4_PREFIX.121 prometheus.LOCAL_DOMAIN

View file

@ -0,0 +1 @@
../../.int_test.env

View file

View file

@ -0,0 +1,27 @@
version: '2.4'
services:
prometheus:
image: ${PROMETHEUS_IMAGE}:${PROMETHEUS_VERSION}
domainname: ${LOCAL_DOMAIN}
hostname: prometheus
container_name: prometheus
restart: on-failure
networks:
prometheus_int:
internet:
ipv4_address: ${IPV4_PREFIX}.121
volumes:
- ./../../vendor/hosts:/etc/hosts
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- --config.file=/etc/prometheus/prometheus.yml
ports:
- '9090:9090'
stop_signal: SIGKILL
env_file: [ ".env", ".prometheus.env", ".int_test.env" ]
networks:
prometheus_int:
internet:
external: true
name: basenet_internet

View file

@ -0,0 +1,19 @@
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'node'
static_configs:
- targets: ['s01.frostfs.devenv:9090', 's02.frostfs.devenv:9090', 's03.frostfs.devenv:9090', 's04.frostfs.devenv:9090']
- job_name: 'http-gw'
static_configs:
- targets: ['http.frostfs.devenv:9090']
- job_name: 'rest-gw'
static_configs:
- targets: ['rest.frostfs.devenv:9090']
- job_name: 's3-gw'
static_configs:
- targets: ['s3.frostfs.devenv:9090']
- job_name: 'neo-go'
static_configs:
- targets: ['morph-chain.frostfs.devenv:20001']