promgen compose
See original GitHub issueHi,
promgen looks exactly what i need to run prometheus since I want to change the configurations of alerts and nodes dynamically. I’ve started with taking your docker-compose that you have in your project and altering it to include both the mysql and redis databases (later on I can move them outside of this docker). I can successfully start the docker containers and all of them seem to be running just fine, but I’m having issues configuring promgen.
I add a exporter successfully to the UI and the test functionality confirms it working, however the Prometheus server does not get it added to its targets. Further when I attempt to add a alert rule i get internal server errors (and nothing visible in the promgen log). What am I doing wrong?
PS: i ran the DB initialization scripts manually (i plan to run them automatically later).
The prometheus server has been added:
The compose (WIP) used:
version: '2'
services:
redis:
image: redis
container_name: redis
network_mode: bridge
restart: always
ports:
- 6379:6379
mysql:
image: mariadb
container_name: mysql
network_mode: bridge
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: pypromgen
MYSQL_USER: promgen
MYSQL_PASSWORD: promgen
base:
build: .
image: promgen
network_mode: bridge
command: echo ""
environment:
CELERY_BROKER_URL: redis://redis:6379/0
DATABASE_URL: mysql://promgen:promgen@mysql:3306/pypromgen
SECRET_KEY: asdf
prep:
extends: base
container_name: prep
command: sh -c "promgen migrate"
links:
- mysql
- redis
environment:
DEBUG: 1
web:
extends: base
container_name: web
command: promgen runserver 0.0.0.0:8000
links:
- mysql
- redis
- prep
- nodeexporter
ports:
- "8000:8000"
environment:
DEBUG: 1
worker:
extends: base
container_name: worker
command: worker -l info --queues localhost,celery
links:
- prometheus
- redis
volumes:
- ./docker:/etc/prometheus
prometheus:
image: prom/prometheus
container_name: prometheus
network_mode: bridge
links:
- alertmanager
- blackbox
ports:
- "9090:9090"
volumes:
- ./docker:/etc/prometheus
blackbox:
image: prom/blackbox-exporter
container_name: blackbox
network_mode: bridge
volumes:
- ./docker:/etc/prometheus
nodeexporter:
image: prom/node-exporter
container_name: nodeexporter
network_mode: bridge
ports:
- 9100:9100
alertmanager:
image: prom/alertmanager
container_name: alertmanager
network_mode: bridge
links:
- web
ports:
- "9093:9093"
volumes:
- ./docker/alertmanager.yml:/etc/alertmanager/config.yml
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (8 by maintainers)
Top GitHub Comments
My bad, that actually is #38.
However, it has been merged, so you should be able to pull the new version of the image.
Hey, I consider this issue closed.