Comments (8)
The preparation and installation required for the worker are the same as for the web app.
Then you register and start like this:
# Register prometheus server
# Syntax: promgen register <shard name> <prometheus host> <prometheus port>
promgen register default localhost 9090
# Start worker
# Syntax: celery -A promgen worker -l <log level> -Q <queues>
celery -A promgen worker -l info -Q localhost
The worker needs to subscribe to the queue with the host name of the prometheus server.
You can also have a look at #57, it includes documentation on how to setup the web app and the worker using docker.
from promgen.
i believe the above is for push model if promgen and promethues is installed on the same server.
But my Prometheus and promgen is on different server, how can i configure pull model?
Update:
I saw this article
https://github.com/kfdm/promgen/blob/5baa8fe44e6f5bac78f4f33989990d0101c5b40b/docs/worker.rst
But how should i register my Prometheus server to promgen? Or are there any missing steps?
from promgen.
The celery worker is installed the same way as the web app and as long as they can reach the same database and redis instance, it doesn't matter if the web app and workers are on different servers.
Apparently I forgot to merge some docs updates but you should be able to see some illustrations here
https://github.com/line/promgen/pull/46/files
I'll try to go through the PRs on Monday.
from promgen.
Dear Paul & Seoster,
Will await the documents and finish testing in my linux environment and if i have spare time will test on docker
My other question is are the below run once:
Register prometheus server
Syntax: promgen register
promgen register default localhost 9090
Start worker
Syntax: celery -A promgen worker -l -Q
celery -A promgen worker -l info -Q localhost
As i am running promgen in a virtual env, and if the above is run once and upon my server reboot it is still in effect?
thank you all for the wonderful job
from promgen.
Correct. Those commands register the worker in Promgen's database so the data is saved between reboots and anything else :)
The worker flags you need to add to your startup command so that it knows which queue to run from.
from promgen.
Dear Paul,
If i am running uWSGI to launch the application where should i add the worker flag?
from promgen.
uWSGI would be used to run the Promgen worker, so there are no worker flags required.
Something like systemd or another process manager would run the worker on the same node as Prometheus. I use something like this when deployed from Ansible
[Unit]
Description=Daemon for Celery
After=network.target
[Service]
Type=simple
ExecStart={{ promgen_virutalenv }}/bin/celery -A promgen worker -l info --queues {{ ansible_host }}
Restart=on-failure
User=prometheus
[Install]
WantedBy=multi-user.target
from promgen.
Dear Paul,
Noted on this let me test it out and feedback and update the document as needed
from promgen.
Related Issues (20)
- the issue with docker-compose. HOT 1
- Promgen integreate to ldap or Active directory Services or SAML Auth HOT 1
- When do prometheus alert set via promgen, It will occur 'reload' action? HOT 1
- run docker run --rm -it -v ~/.config/promgen:/etc/promgen/ line/promgen bootstrap error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte
- please link the document in the README.md
- promgen web worker bad request HOT 2
- it can not work well HOT 3
- Add feature to allow slack notification to use proxy
- Docker-compose.yml TypeError HOT 1
- [QUESTION] Prometheus Parameter HOT 3
- docker-compose setup results in broken UI HOT 3
- Not work well
- [QUESTION] Promgen ALLOWED_HOSTS HOT 1
- Can I add a host with domain name? HOT 1
- How to configure farm hosts when my application deploy in k8s cluster? HOT 2
- Errors on worker HOT 1
- Change field type of url field HOT 1
- Prometheus rules seems not generating correctly. HOT 2
- [Question]How can I receive an alert message?
- arm64 or armhf version HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from promgen.