Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph data persistency #27

Closed
tbarbugli opened this issue Oct 19, 2012 · 15 comments
Closed

graph data persistency #27

tbarbugli opened this issue Oct 19, 2012 · 15 comments

Comments

@tbarbugli
Copy link
Contributor

Hi,
Did I miss it or all real time data celery fetches from workers is not persistent on flower end ?

Tommaso

@mher
Copy link
Owner

mher commented Oct 19, 2012

Flower gets celery events in real time and doesn't store anything on a disk. If you restart flower server you get an initial state.

@tbarbugli
Copy link
Contributor Author

yep, I got that right then :)
do you see this feature coming in the future of flower ? (i might give some help developing the feature in that case).

@mher
Copy link
Owner

mher commented Oct 19, 2012

Celery can produce a huge amount of events and storing them all on the disk may be undesirable. What is you use case?

@tbarbugli
Copy link
Contributor Author

I think it would be cool to keep data about throughput per instance (the monitor graph) over time.

@honza
Copy link

honza commented Feb 24, 2013

I would like this as well. I think it would be enough to store let's say the last 30 days worth of data. If flower has been running for a while you get nice graphs and tons of data about how your workers are performing, etc but if you need to make a configuration change and restart the server, all of that is lost. What if your supervisord process that keeps flower alive decides to go to lunch? Just a thought...

@saidimu
Copy link

saidimu commented Feb 28, 2013

For redis-backed brokers and storage backends, it may be a good idea to persist the events for a configurable amount of time specified by the user.

Setting an expiration on the already existing keys seems a logical option. Redis can then be configured http://redis.io/topics/config to cap the memory usage of those keys by either evicting old keys or denying the writing of new keys.

@mher
Copy link
Owner

mher commented Mar 1, 2013

I've implemented --persistent option which allows to save/load the current state. Be default flower.db file is used which can be changed with --db option.

--max_task option allows to limit the number of tasks in memory.

@mgingras
Copy link

mgingras commented May 4, 2015

@mher When you navigate to /monitor is the expected behaviour that it will show you past executed tasks or is it only real updated in real time?

Thanks.

@caiofbpa
Copy link

caiofbpa commented Sep 4, 2015

I have the same question: does persistent mode have any effect on the monitor's charts?

@mher
Copy link
Owner

mher commented Sep 4, 2015

/monitor only shows real-time data.

@gtangquri
Copy link

@mher Is there a way where I can edit the contents of flower.db such that if the file gets too big then I can edit it to save N newest tasks and delete the rest? I'm not sure whether --max_tasks will accomplish this

@shuigupta
Copy link

@mher I am new to flower and I am not able to figure out that from where does flower read celery tasks/events to show on dashboard? If I am not setting persistence flag as True that means there is no database file being created, then where does it read the data from?

@sshishov
Copy link

Flower reads data from events. When celery got message from broker, it fires the events: received, started, processed and flower listenings for these events and update it's internal state accordingly and represent it using API: dashboard, tasks, monitors etc... Therefore if celery started and flower not, then when you start the latter, you do not get previous data as flower process events in real time.

To keep data about workers and counters, I tried to persist counter data in this PR: #926
Dashboard now became restored. Will check monitor as well later on

@ilyakatz
Copy link

Any update on PR #926? would be great to see this data persisted

@mher
Copy link
Owner

mher commented Jul 5, 2020

Monitor tab is deprecated, use Prometheus instead.

@mher mher closed this as completed Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants