Skip to content
Snippets Groups Projects
Commit e785dde9 authored by Fanna Lautenbach's avatar Fanna Lautenbach
Browse files

add prometheus and grafana to docker-compose; disable login requirement for reading exports

parent e94e242e
No related branches found
No related tags found
1 merge request!101Add prometheus exporter
Pipeline #45555 passed
......@@ -58,6 +58,32 @@ services:
command: celery -A ldvspec worker -l INFO
restart: always
prometheus:
container_name: ldv-spec-prometheus
image: prom/prometheus
volumes:
- prometheus_data:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
restart: unless-stopped
depends_on:
- ldv-spec-cache
- ldv-spec-db
networks:
- ldv_network
grafana:
container_name: ldv-spec-grafana
image: grafana/grafana
ports:
- "3000:3000"
restart: unless-stopped
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
ldv-specification:
container_name: ldv-specification
image: git.astron.nl:5000/astron-sdc/ldv-specification:latest
......@@ -88,3 +114,5 @@ services:
volumes:
ldv-spec-db:
prometheus_data:
grafana_data:
......@@ -65,5 +65,28 @@ services:
command: celery -A ldvspec worker -l INFO
restart: always
prometheus:
container_name: ldv-spec-prometheus
image: prom/prometheus
volumes:
# - prometheus_data:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stopped
depends_on:
- ldv-spec-cache
- ldv-spec-db
network_mode: host
grafana:
container_name: ldv-spec-grafana
image: grafana/grafana
# ports:
# - "3000:3000"
restart: unless-stopped
depends_on:
- prometheus
# volumes:
# - grafana_data:/var/lib/grafana
volumes:
ldv-spec-db:
ldv-spec-db:
\ No newline at end of file
......@@ -26,6 +26,32 @@ services:
- ldv_network
container_name: ldv-spec-rabbit
prometheus:
container_name: ldv-spec-prometheus
image: prom/prometheus
volumes:
- prometheus_data:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
restart: unless-stopped
depends_on:
- ldv-spec-cache
- ldv-spec-db
networks:
- ldv_network
grafana:
container_name: ldv-spec-grafana
image: grafana/grafana
ports:
- "3000:3000"
restart: unless-stopped
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
ldv-specification-background:
container_name: ldv-specification-background
image: git.astron.nl:5000/astron-sdc/ldv-specification:${LDVSPEC_VERSION:-latest}
......@@ -63,3 +89,7 @@ services:
env_file:
- $HOME/shared/ldvspec.env
restart: always
volumes:
prometheus_data:
grafana_data:
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: ldv-specification
metrics_path: '/ldvspec/prometheus-metrics/'
static_configs:
- targets: ['127.0.0.1:8003']
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
\ No newline at end of file
......@@ -3,6 +3,6 @@ from django_prometheus.exports import ExportToDjangoView
def metrics_view(request):
if request.user.is_superuser:
return ExportToDjangoView(request)
return render(request, "lofardata/forbidden.html")
return ExportToDjangoView(request)
# if not request.user.is_superuser:
# return render(request, "lofardata/forbidden.html")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment