Added boilerplate for Prometheus
This commit is contained in:
6
.docker/prometheus/alert.yml
Normal file
6
.docker/prometheus/alert.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
groups:
|
||||||
|
- name: DemoAlerts
|
||||||
|
rules:
|
||||||
|
- alert: InstanceDown
|
||||||
|
expr: up{job="services"} < 1
|
||||||
|
for: 5m
|
17
.docker/prometheus/prometheus.yml
Normal file
17
.docker/prometheus/prometheus.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
|
||||||
|
rule_files:
|
||||||
|
- alert.yml
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: services
|
||||||
|
metrics_path: /metrics
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- 'prometheus:9090'
|
||||||
|
- job_name: 'file_ds'
|
||||||
|
file_sd_configs:
|
||||||
|
- files:
|
||||||
|
- targets.json
|
10
.docker/prometheus/targets.json
Normal file
10
.docker/prometheus/targets.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"targets": [
|
||||||
|
"api:9091"
|
||||||
|
],
|
||||||
|
"labels": {
|
||||||
|
"job": "5f11-api"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -4,8 +4,28 @@ services:
|
|||||||
scylla:
|
scylla:
|
||||||
image: scylladb/scylla
|
image: scylladb/scylla
|
||||||
ports:
|
ports:
|
||||||
- "7000:7000"
|
- 7000:7000
|
||||||
- "7001:7001"
|
- 7001:7001
|
||||||
- "9042:9042"
|
- 9042:9042
|
||||||
- "9160:9160"
|
- 9160:9160
|
||||||
- "10000:10000"
|
- 10000:10000
|
||||||
|
volumes:
|
||||||
|
- .docker/scylla/scylla.yaml:/etc/scylla/scylla.yaml
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus:v2.30.3
|
||||||
|
ports:
|
||||||
|
- 9090:9090
|
||||||
|
volumes:
|
||||||
|
- .docker/prometheus:/etc/prometheus
|
||||||
|
- prometheus-data:/prometheus
|
||||||
|
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
|
||||||
|
# api:
|
||||||
|
# build:
|
||||||
|
# context: .
|
||||||
|
# ports:
|
||||||
|
# - 5111:5111
|
||||||
|
# depends_on:
|
||||||
|
# - scylla
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
prometheus-data:
|
||||||
|
@ -4,4 +4,8 @@ Host: 0.0.0.0
|
|||||||
Port: 5111
|
Port: 5111
|
||||||
ScyllaDB:
|
ScyllaDB:
|
||||||
Hosts:
|
Hosts:
|
||||||
- "localhost"
|
- localhost
|
||||||
|
# Prometheus:
|
||||||
|
# Host: 0.0.0.0
|
||||||
|
# Port: 9091
|
||||||
|
# Path: /metrics
|
||||||
|
Reference in New Issue
Block a user