promgen
promgen copied to clipboard
promgen web worker bad request
I run promgen following the docs, bootstrap, migrate, check and createsuperuser all run normally But after run web server, when I access server , it outputs Bad Request (400) the logs of promgen don't output error
root@mgt01:~# docker run --rm -p 8001:8000 -v ~/.config/promgen:/etc/promgen/ line/promgen:v0.50
[2021-03-11 08:17:57 +0000] [1] [INFO] Starting gunicorn 19.9.0
[2021-03-11 08:17:57 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2021-03-11 08:17:57 +0000] [1] [INFO] Using worker: sync
[2021-03-11 08:17:57 +0000] [8] [INFO] Booting worker with pid: 8
[2021-03-11 08:17:57 +0000] [9] [INFO] Booting worker with pid: 9
[2021-03-11 08:17:57 +0000] [10] [INFO] Booting worker with pid: 10
[2021-03-11 08:17:57 +0000] [11] [INFO] Booting worker with pid: 11
[2021-03-11 08:18:33 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:8)
[2021-03-11 08:18:33 +0000] [8] [INFO] Worker exiting (pid: 8)
[2021-03-11 08:18:33 +0000] [28] [INFO] Booting worker with pid: 28
the config of promgen is right like below
cat .config/promgen/CELERY_BROKER_URL
redis://100.105.240.158:6379/0
cat .config/promgen/DATABASE_URL
mysql://root:[email protected]/promgen
cat .config/promgen/promgen.yml
# Prometheus settings
# These are used for Promgen to automatically trigger a reload on target changes
prometheus:
url: http://100.105.10.77:9090/
# Path to promtool to verify valid rules file
promtool: /usr/local/bin/promtool
# Output rule configuration to this path
rules: /etc/prometheus/promgen.rule.yml
# Output blackbox configuration to this path
blackbox: /etc/prometheus/blackbox.json
# Output target configuration to this path
targets: /etc/prometheus/promgen.json
alertmanager:
url: http://100.105.217.142:9093
# Blacklist labels we want to filter out and prevent
# sending alerts on
blacklist:
severity: ["debug", "blackhole"]
# Sender Configuration Settings
# These match the module path of the plugin itself
promgen.notification.email:
sender: [email protected]
promgen.notification.ikasan:
server: http://ikasan.example
promgen.notification.linenotify:
server: https://notify.example
cat .config/promgen/SECRET_KEY
123456a?
Do you have ALLOWED_HOSTS set ? https://docs.djangoproject.com/en/3.1/ref/settings#allowed-hosts It's possible I do not have this documented well 🙇
You can set it to *
to disable this check
yes, add it on https://github.com/line/promgen/pull/319