question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi,

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).

image

The prometheus server has been added:

image

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:closed
  • Created 6 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
seoestercommented, Jan 29, 2018

My bad, that actually is #38.

However, it has been merged, so you should be able to pull the new version of the image.

0reactions
witzatomcommented, Feb 3, 2018

Hey, I consider this issue closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

promgen/docker-compose.yml at master - GitHub
Promgen is a configuration file generator for Prometheus - promgen/docker-compose.yml at master · line/promgen.
Read more >
promgen - PyPI
Promgen is a configuration file generator for Prometheus. ... line/promgen worker # Or if using docker-compose you can spin up a complete ...
Read more >
line/promgen - Docker Image
Promgen is a configuration file generator for Prometheus. ... line/promgen worker # Or if using docker-compose you can spin up a complete test...
Read more >
Prometheus Server — Promgen 0.51.dev documentation
A Promgen worker is run on each Prometheus server which subscribes to a named queue to signal when to write out an updated...
Read more >
write_cfgmem output != promgen output - Xilinx Support
However, I also came across jaredcasper's issue with write-cfgmem bit order. ... to a bin file using the promgen command from the Tech...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found