Giter Site home page Giter Site logo

kodless / leek Goto Github PK

View Code? Open in Web Editor NEW
144.0 2.0 17.0 12.63 MB

Celery Tasks Monitoring Tool

Home Page: https://tryleek.com

License: Apache License 2.0

Makefile 0.26% Python 35.61% Dockerfile 0.69% JavaScript 2.08% TypeScript 55.05% Shell 0.30% HCL 4.31% Smarty 0.14% Groovy 1.44% Less 0.12%
celery monitor distributed queue flower monitoring-tool python task worker rabbitmq

leek's People

Contributors

adamihamza avatar cktang88 avatar haim0n avatar kodless avatar mprince avatar stubatiger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

leek's Issues

Make options in state filter persistent even when there are 0 related tasks

Is your feature request related to a problem? Please describe.
When I have a small amount of tasks it's tricky to ctch the moment when I do have tasks in STARTED state. So I can't filter by them to monitor in real time.

Describe the solution you'd like
Would be great to see all states ever met (or ever possibl) in that select.

Describe alternatives you've considered
Reload until I get something in Started state to filter by them. But that's nott the best experince :).

Additional context
empty

When deleting the only one application and creating a new one, the deleted application is still selected

Describe the bug
When deleting the only one application and creating a new one, the deleted application is still selected instead of selecting a new one. Because the old app is selected, there are errors:

image

To Reproduce
Steps to reproduce the behavior:

  1. Create a new application. Make sure there is only one app
  2. Go to applications and delete the application
  3. It will prompt to create a new one. Create it
  4. See error popping up because the deleted app is still selected

Expected behavior
The new app should be autoselected

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome v90

Docker limits

When I tried to run Leek with Redis as broker I got:

es01         | ERROR: [2] bootstrap checks failed
es01         | [1]: max file descriptors [1024] for elasticsearch process is too low, increase to at least [65535]
es01         | [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
es01         | ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/es-docker-cluster.log

Seems like a good idea to modify the Docker compose file to specify sufficient ulimits for ES.

Auto-refresh pages so it gives real-time monitoring

Is your feature request related to a problem? Please describe.
It's not a real problem but makes our usage experience not so convenient. When I look at tasks I see how time is ticking near each task, but new tasks are not appearing — which makes me nervous and forces to constantly click refresh button :).

Describe the solution you'd like
It would be nice to re-fresh the data on each page periodically. Let's say every 1-2 seconds we refresh data.

Describe alternatives you've considered
Currently we force people to press refresh button, but we could do that for them. Another alternative would be to organize a way when API pushes changes to web (websockets, or long polling). But I think just doing same request periodically is the easiest.

Additional context
empty

Workers are not filtered by environment

Describe the bug
When there are different environments we output data on each page according to that environment. But on Workers page we output all workers regardless of the environment.

To Reproduce
Steps to reproduce the behavior:

  1. Setup workers for multiple environments and subscribe to them
  2. Select one environment
  3. Go to Workers page

Expected behavior
See workers associated with selected environment.

Screenshots
empty

Desktop (please complete the following information):

  • OS: MacOS
  • Browser firefox
  • Version 88

Smartphone (please complete the following information):
empty

Additional context
empty

Demo web app

I am interested in making use of this tool given the UI is intuitive and better than existing solutions. Is there a demo web app that I can play around with?

Suporting lightweight datastorage

Hi, been looking for a Flower alternative for a while, so thanks for this.

As much as this seems promising, the use of Elasticsearch makes it unusable for small projects (uses 850MB of RAM but normally needs something like 1-1,5 Gb to run).

I'm thinking it would be great to have support for Postgres with FullText Search, or maybe even a SQLite option (it has a Full Text Search extension if I'm not mistaken).

As much of the data is pretty much ephemeral, there could be a logic implemented to keep data for X amount of days, to improve performance and make it lightweight.

I would be happy to contribute if you think this could make sense.

Thanks!

Easier authentication

Hello, first and foremost i really love leek.
Its such a huge step from flower or other celery monitoring tools, its incredible. Great work.

My pain currently is that as i have understood it, that authentication cannot be disabled and can only be done with Firebase.

I can probably understand the reasoning behind that, but for me the setup process for the authentication is really cumbersome and for starters who just want to try leek, i can imagine they get scared by it and in the end miss out on the awesomeness of leek.

Can there be anything done like turning off authentication completely or just using simple BasicAuth or some static Usernames/Passwords?

Environment changing when selecting a task

Describe the bug
While in another env and selecting a task - the env you are in viewing the tasks will appear to change to the agent's first subscription's app_env.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure there is an active & on agent with at least 2 subscriptions containing different app_env's.
  2. Change the env via the dropdown at the top right to any other env than default.
  3. Go to Tasks via top menu bar.
  4. Select any task, and verify the env that is now selected via that same dropdown used to change.
  5. Browse around to verify that the env has indeed changed.

Expected behavior
If I have two subscriptions with app_env's respectively:

  • prod
  • dev
    I would expect if I changed the env via the dropdown at the top right to 'dev' to stay in 'dev' when I select to view a task's details or perform any other action.

bug when deploy on a sub folder instead of root of a domain

Hi,

I want the deploy leek on a sub folder instead of root of a domain, so I added pathPrefix: '/leek' on gatsby-config.js and made some other modifications needed. But when visit on http://localhost/leek, when redirect to http://localhost/leek/page-data/page-data.json?e3d5d758098a36971ccf1d639dccf5b8?app=leek it became http://localhost/leek/page-data/leek/page-data.json?e3d5d758098a36971ccf1d639dccf5b8?app=leek, it added an unwanted path prefix between page-data and page-data.json. Leek works no problem on 0.5.5 version with my modifications.

Leek says my broker isnt reachable due to broker_management is_alive check failure

Describe the bug
Not 100% sure this is a bug, but the celery user by default does not have access to the aliveness-check api. so When the broker_management client calls is_alive it seems to fail and claim that my broker is not reachable.

I tried it from inside the running leek container

>>> import kombu
>>> c = kombu.connection.Connection("amqp://celery:<redacted>@rabbitmq.service.consul:5672/celery")
>>>
>>> c.ensure_connection(max_retries=2)
<Connection: amqp://celery:**@rabbitmq.service.consul:5672/celery at 0x7f415ae0f7f0>
>>> c.release()

>>> c = AMQPClient("rabbitmq.service.consul:15672", "celery", <redacted>, scheme="http", verify=False)
>>> c.is_alive()
Traceback (most recent call last):
  File "/opt/venv/lib/python3.8/site-packages/pyrabbit2/api.py", line 124, in _call
    resp = self.http.do_call(path, method, body, headers, params)
  File "/opt/venv/lib/python3.8/site-packages/pyrabbit2/http.py", line 110, in do_call
    raise HTTPError(content, resp.status_code, resp.text, path, body)
pyrabbit2.http.HTTPError: 401 - {"error":"not_authorised","reason":"User not authorised to access virtual host"} (User not authorised to access virtual host) (aliveness-test/%2F) (None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/venv/lib/python3.8/site-packages/pyrabbit2/api.py", line 260, in is_alive
    resp = self._call(uri, 'GET')
  File "/opt/venv/lib/python3.8/site-packages/pyrabbit2/api.py", line 127, in _call
    raise PermissionError('Insufficient permissions to query ' +
pyrabbit2.api.PermissionError: Insufficient permissions to query aliveness-test/%2F with user celery :401 - {"error":"not_authorised","reason":"User not authorised to access virtual host"} liveness-test/%2F) (None)

Is there any workaround / other way to check if the broker_management_url is reeachable that wouldnt involve giving my production celery user more vhost access?

Additionally, the responses in the ui dont indicate if its the broker_management that is unreachable or the broker, it seems to return a generic "broker" unreachable message.

Tasks in chain lost task name

First, Thank you for your excellent work!

I have a chain task which has two tasks, the first task shows right in Tasks page, but the second shows "Task name not yet received" in task name column and no route and queue info. But the second task shows right in Flower. The two are in different queues.

[Bug] Application not ready with status code 404

Describe the bug
When attempting to run the demo (both Redis and RabbitMQ), Leek starts up successfully but once the agent starts, it continuously reports the following error:

app_1        | WARNING:leek.agent.consumer:(main) Application not ready with status code 404
app_1        | WARNING:leek.agent.consumer:(main) b'{"error": {"code": "404001", "message": "Application does not exist", "reason": "Index not yet created"}}\n'

To Reproduce
Steps to reproduce the behavior:

  1. curl -sSL https://raw.githubusercontent.com/kodless/leek/master/demo/docker-compose-redis-no-auth.yml > docker-compose.yml
  2. docker-compose up

Expected behavior
I think the agent should start successfully and not raise 404. When I tried using the app, it did not seem like it was functional; no workers, queues, or tasks were reported.

Logs

Attaching to es01, leek_mq_1, leek_worker_1, leek_publisher_1, leek_app_1
mq_1         | Configuring logger redirection
mq_1         |
mq_1         |   ##  ##      RabbitMQ 3.8.9
mq_1         |   ##  ##
mq_1         |   ##########  Copyright (c) 2007-2020 VMware, Inc. or its affiliates.
mq_1         |   ######  ##
mq_1         |   ##########  Licensed under the MPL 2.0. Website: https://rabbitmq.com
mq_1         |
mq_1         |   Doc guides: https://rabbitmq.com/documentation.html
mq_1         |   Support:    https://rabbitmq.com/contact.html
mq_1         |   Tutorials:  https://rabbitmq.com/getstarted.html
mq_1         |   Monitoring: https://rabbitmq.com/monitoring.html
mq_1         |
mq_1         |   Logs: <stdout>
mq_1         |
mq_1         |   Config file(s): /etc/rabbitmq/rabbitmq.conf
mq_1         |
mq_1         |   Starting broker... completed with 4 plugins.
app_1        | 2021-11-03 03:37:17,923 INFO Set uid to user 0 succeeded
app_1        | 2021-11-03 03:37:17,942 INFO RPC interface 'supervisor' initialized
app_1        | 2021-11-03 03:37:17,942 CRIT Server 'unix_http_server' running without any HTTP authentication checking
app_1        | 2021-11-03 03:37:17,945 INFO supervisord started with pid 1
app_1        | 2021-11-03 03:37:18,949 INFO spawned: 'bootstrap' with pid 9
app_1        | 2021-11-03 03:37:19,951 INFO success: bootstrap entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
app_1        |
app_1        | 8 8888         8 8888888888   8 8888888888   8 8888     ,88'
app_1        | 8 8888         8 8888         8 8888         8 8888    ,88'
app_1        | 8 8888         8 8888         8 8888         8 8888   ,88'
app_1        | 8 8888         8 8888         8 8888         8 8888  ,88'
app_1        | 8 8888         8 888888888888 8 888888888888 8 8888 ,88'
app_1        | 8 8888         8 8888         8 8888         8 8888 88'
app_1        | 8 8888         8 8888         8 8888         8 888888<
app_1        | 8 8888         8 8888         8 8888         8 8888 `Y8.
app_1        | 8 8888         8 8888         8 8888         8 8888   `Y8.
app_1        | 8 888888888888 8 888888888888 8 888888888888 8 8888     `Y8.
app_1        |
app_1        |
app_1        | |#|     Leek Celery Monitoring Tool                               |#|
app_1        | |#|     Versions: 0.5.2                                  |#|
app_1        | |#|     Release date: 2021/08/29 12:08:53                         |#|
app_1        | |#|     Codename: Fennec                                          |#|
app_1        | |#|     Repository: https://github.com/kodless/leek               |#|
app_1        | |#|     Homepage: https://tryleek.com                             |#|
app_1        | |#|     Documentation: https://tryleek.com/docs/introduction/leek |#|
app_1        |
app_1        | Author: Hamza Adami <[email protected]>
app_1        | Follow me on Github: https://github.com/kodless
app_1        | Buy me a coffee: https://buymeacoffee.com/fennec
app_1        |
app_1        |
app_1        | SERVICE     STATUS      URL
app_1        | =======     ------      ---
app_1        | - API       ENABLED    http://0.0.0.0:5000
app_1        | - WEB       ENABLED    http://0.0.0.0:8000
app_1        | - AGENT     ENABLED    -
app_1        |
app_1        | INFO:elasticsearch:PUT http://es01:9200/_scripts/task-merge [status:200 request:0.079s]
app_1        | INFO:elasticsearch:PUT http://es01:9200/_scripts/worker-merge [status:200 request:0.134s]
app_1        | 2021-11-03 03:37:25,858 INFO spawned: 'api' with pid 12
app_1        | [2021-11-03 03:37:26 +0000] [12] [INFO] Starting gunicorn 20.0.4
app_1        | [2021-11-03 03:37:26 +0000] [12] [INFO] Listening at: http://0.0.0.0:5000 (12)
app_1        | [2021-11-03 03:37:26 +0000] [12] [INFO] Using worker: gevent
app_1        | [2021-11-03 03:37:26 +0000] [23] [INFO] Booting worker with pid: 23
app_1        | [2021-11-03 03:37:26 +0000] [24] [INFO] Booting worker with pid: 24
app_1        | 2021-11-03 03:37:27,360 INFO success: api entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app_1        | api: started
app_1        | Connected to elastic searchConnected to elastic search
app_1        |
app_1        | 2021-11-03 03:37:27,655 INFO spawned: 'agent' with pid 26
app_1        | 2021-11-03 03:37:27,655 INFO success: agent entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
app_1        | agent: started
app_1        | 2021-11-03 03:37:27,851 INFO spawned: 'web' with pid 38
app_1        | INFO:__main__:(main) Loading subscriptions...
app_1        | INFO:__main__:(main) Found 1 subscriptions!
app_1        | INFO:__main__:(main) Building consumers...
app_1        | INFO:leek.agent.consumer:(main) Building consumer [Subscription=leek-prod, Prefetch=1000, Pool=2] ...
app_1        | INFO:leek.agent.consumer:(main) Ensure connection to the broker amqp://admin:**@mq:5672//...
app_1        | INFO:leek.agent.consumer:(main) Broker is up!
app_1        | INFO:leek.agent.consumer:(main) Declaring Exchange/Queue and binding them...
app_1        | INFO:leek.agent.consumer:(main) Exchange/Queue declared and bound!
app_1        | INFO:leek.agent.consumer:(main) Ensure connection to the API http://0.0.0.0:5000...
app_1        | INFO:leek.agent.consumer:(main) API is up!
app_1        | INFO:__main__:(main) Consumers built...
app_1        | INFO:__main__:(main) Starting Leek Agent...
app_1        | 2021-11-03 03:37:29,184 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app_1        | web: started
app_1        | 2021-11-03 03:37:29,239 INFO exited: bootstrap (exit status 0; expected)
app_1        | WARNING:leek.agent.consumer:(main) Application not ready with status code 404
app_1        | WARNING:leek.agent.consumer:(main) b'{"error": {"code": "404001", "message": "Application does not exist", "reason": "Index not yet created"}}\n'
app_1        | WARNING:leek.agent.consumer:(main) Application not ready with status code 404
app_1        | WARNING:leek.agent.consumer:(main) b'{"error": {"code": "404001", "message": "Application does not exist", "reason": "Index not yet created"}}\n'
app_1        | WARNING:leek.agent.consumer:(main) Application not ready with status code 404
app_1        | WARNING:leek.agent.consumer:(main) b'{"error": {"code": "404001", "message": "Application does not exist", "reason": "Index not yet created"}}\n'
app_1        | WARNING:leek.agent.consumer:(main) Application not ready with status code 404
app_1        | WARNING:leek.agent.consumer:(main) b'{"error": {"code": "404001", "message": "Application does not exist", "reason": "Index not yet created"}}\n'
app_1        | WARNING:leek.agent.consumer:(main) Application not ready with status code 404
app_1        | WARNING:leek.agent.consumer:(main) b'{"error": {"code": "404001", "message": "Application does not exist", "reason": "Index not yet created"}}\n'
app_1        | WARNING:leek.agent.consumer:(main) Application not ready with status code 404

Desktop (please complete the following information):

  • OS: macOS
  • Version: 0.5.2

Leek website not working

on website receiving following error

This site can’t be reached tryleek.com’s DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE

Timeout if broker connection cannot be ensured

I have multiple subscriptions set via LEEK_AGENT_SUBSCRIPTIONS with varying broker urls inside them.
If a single broker cannot be connected to, for example if the hostname cannot be resolved, the agent process will hang/fail
at this step

INFO:leek.agent.consumer:(main) Building consumer [Subscription=mars-prod, Prefetch=1000, Pool=2] ...
INFO:leek.agent.consumer:(main) Ensure connection to the broker <BROKER_URL>...

A error will be thrown, but from what i have noticed is that, the brokers from the other subscriptions will not be connected to, although they may be reachable

Broker memory explosion with loss of elastic search.

Hi I'm not sure this is a bug with leek exactly, but I'd like some help understanding the behaviour of my leek/celery combo.

Describe the bug
Our ElasticSearch cluster died, and suddenly our brokers' memory usage skyrocketed since the celeryev.* keys were growing indefinitely. Is this expected? Or are we misconfiguring our events/leek somehow?

To Reproduce

  1. Have celery running on redis broker and broadasting events to leek.
  2. Have ES go down.

Expected behavior
Celery events are TTL'd somehow to prevent runaway growth.

Additional context
All running on AWS.

Thank you in advance, Hamza. Leek is a great tool!

Leek stops consuming after some time

Hello, im using leek docker version kodhive/leek:0.4.0 with elastic search library/elasticsearch:7.10.1.

All works well, but sometimes after a few days/hours or so, leek stops consuming messages from the leek.fanout queue and the queue keeps growing afterwards.
In the logging output i get the following:

INFO:leek.agent.consumer:(main) Configuring channel...
INFO:leek.agent.consumer:(main) Channel Configured...
INFO:leek.agent.consumer:(main) Creating consumer...
INFO:leek.agent.consumer:(main) Consumer created!
INFO:leek.agent.consumer:(main) Consumer ready!
WARNING:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "400002", "title": "Schema Validation Error", "message": "One or more incorrect fields", "reason": "Key \'freq\' error:\\n5 should be instance of \'float\'"}, "message": "Key \'freq\' error:\\n5 should be instance of \'float\'"}\n'
WARNING:leek.agent.consumer:(Greenlet-0) Failed to send message with status code 400, backoff for 5 seconds.

To let leek work again, i have to manually delete the leek.fanout queue in rabbitmq, so leek can recreate it and start consuming again.

Sadly i have no clue whats going on here or where to look for a fix.
Can someone help me out?

Oops, something went wrong

Some time will get this error

agent_1  | 2021-10-31 10:12:03,219 INFO spawned: 'agent' with pid 11
agent_1  | 2021-10-31 10:12:03,219 INFO success: agent entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
agent_1  | agent: started
agent_1  | 2021-10-31 10:12:03,261 INFO exited: bootstrap (exit status 0; expected)
agent_1  | INFO:__main__:(main) Loading subscriptions...
agent_1  | INFO:__main__:(main) Found 1 subscriptions!
agent_1  | INFO:__main__:(main) Building consumers...
agent_1  | INFO:leek.agent.consumer:(main) Building consumer [Subscription=womo-prod, Prefetch=1000, Pool=20] ...
agent_1  | INFO:leek.agent.consumer:(main) Ensure connection to the broker redis://xxx/0...
agent_1  | INFO:leek.agent.consumer:(main) Broker is up!
agent_1  | INFO:leek.agent.consumer:(main) Declaring Exchange/Queue and binding them...
agent_1  | INFO:leek.agent.consumer:(main) Exchange/Queue declared and bound!
agent_1  | INFO:leek.agent.consumer:(main) Ensure connection to the API https://leek-api.womo.site...
agent_1  | INFO:leek.agent.consumer:(main) API is up!
agent_1  | INFO:__main__:(main) Consumers built...
agent_1  | INFO:__main__:(main) Starting Leek Agent...
agent_1  | INFO:leek.agent.consumer:(main) App is ready!
agent_1  | INFO:leek.agent.consumer:(main) Connection revived!
agent_1  | INFO:kombu.mixins:Connected to redis://xxx/0
agent_1  | INFO:leek.agent.consumer:(main) Configuring channel...
agent_1  | INFO:leek.agent.consumer:(main) Channel Configured...
agent_1  | INFO:leek.agent.consumer:(main) Creating consumer...
agent_1  | INFO:leek.agent.consumer:(main) Consumer created!
agent_1  | INFO:leek.agent.consumer:(main) Consumer ready!
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "500001", "title": "Internal error", "message": "Oops, something went wrong!", "reason": "expected string or bytes-like object"}, "message": "expected string or bytes-like object"}\n'
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) status code: 500
agent_1  | INFO:leek.agent.consumer:(main) Consumer end!
agent_1  | Restoring 2 unacknowledged message(s)
agent_1  | INFO:leek.agent.consumer:(main) App is ready!
agent_1  | INFO:leek.agent.consumer:(main) Connection revived!
agent_1  | INFO:kombu.mixins:Connected to redis://xxx/0
agent_1  | INFO:leek.agent.consumer:(main) Configuring channel...
agent_1  | INFO:leek.agent.consumer:(main) Channel Configured...
agent_1  | INFO:leek.agent.consumer:(main) Creating consumer...
agent_1  | INFO:leek.agent.consumer:(main) Consumer created!
agent_1  | INFO:leek.agent.consumer:(main) Consumer ready!
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "500001", "title": "Internal error", "message": "Oops, something went wrong!", "reason": "expected string or bytes-like object"}, "message": "expected string or bytes-like object"}\n'
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) status code: 500
agent_1  | INFO:leek.agent.consumer:(main) Consumer end!
agent_1  | Restoring 8 unacknowledged message(s)
agent_1  | INFO:leek.agent.consumer:(main) App is ready!
agent_1  | INFO:leek.agent.consumer:(main) Connection revived!
agent_1  | INFO:kombu.mixins:Connected to redis://xxx/0
agent_1  | INFO:leek.agent.consumer:(main) Configuring channel...
agent_1  | INFO:leek.agent.consumer:(main) Channel Configured...
agent_1  | INFO:leek.agent.consumer:(main) Creating consumer...
agent_1  | INFO:leek.agent.consumer:(main) Consumer created!
agent_1  | INFO:leek.agent.consumer:(main) Consumer ready!
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "500001", "title": "Internal error", "message": "Oops, something went wrong!", "reason": "expected string or bytes-like object"}, "message": "expected string or bytes-like object"}\n'
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) status code: 500
agent_1  | INFO:leek.agent.consumer:(main) Consumer end!
agent_1  | Restoring 8 unacknowledged message(s)
agent_1  | INFO:leek.agent.consumer:(main) App is ready!
agent_1  | INFO:leek.agent.consumer:(main) Connection revived!
agent_1  | INFO:kombu.mixins:Connected to redis://xxx/0
agent_1  | INFO:leek.agent.consumer:(main) Configuring channel...
agent_1  | INFO:leek.agent.consumer:(main) Channel Configured...
agent_1  | INFO:leek.agent.consumer:(main) Creating consumer...
agent_1  | INFO:leek.agent.consumer:(main) Consumer created!
agent_1  | INFO:leek.agent.consumer:(main) Consumer ready!
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "500001", "title": "Internal error", "message": "Oops, something went wrong!", "reason": "expected string or bytes-like object"}, "message": "expected string or bytes-like object"}\n'
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) status code: 500
agent_1  | INFO:leek.agent.consumer:(main) Consumer end!
agent_1  | Restoring 5 unacknowledged message(s)
agent_1  | INFO:leek.agent.consumer:(main) App is ready!
agent_1  | INFO:leek.agent.consumer:(main) Connection revived!
agent_1  | INFO:kombu.mixins:Connected to redis://xxx/0
agent_1  | INFO:leek.agent.consumer:(main) Configuring channel...
agent_1  | INFO:leek.agent.consumer:(main) Channel Configured...
agent_1  | INFO:leek.agent.consumer:(main) Creating consumer...
agent_1  | INFO:leek.agent.consumer:(main) Consumer created!
agent_1  | INFO:leek.agent.consumer:(main) Consumer ready!
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "500001", "title": "Internal error", "message": "Oops, something went wrong!", "reason": "expected string or bytes-like object"}, "message": "expected string or bytes-like object"}\n'
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) status code: 500
agent_1  | INFO:leek.agent.consumer:(main) Consumer end!
agent_1  | Restoring 6 unacknowledged message(s)
agent_1  | INFO:leek.agent.consumer:(main) App is ready!
agent_1  | INFO:leek.agent.consumer:(main) Connection revived!
agent_1  | INFO:kombu.mixins:Connected to redis://xxx/0
agent_1  | INFO:leek.agent.consumer:(main) Configuring channel...
agent_1  | INFO:leek.agent.consumer:(main) Channel Configured...
agent_1  | INFO:leek.agent.consumer:(main) Creating consumer...
agent_1  | INFO:leek.agent.consumer:(main) Consumer created!
agent_1  | INFO:leek.agent.consumer:(main) Consumer ready!
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "500001", "title": "Internal error", "message": "Oops, something went wrong!", "reason": "expected string or bytes-like object"}, "message": "expected string or bytes-like object"}\n'
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) status code: 500
agent_1  | INFO:leek.agent.consumer:(main) Consumer end!
agent_1  | Restoring 11 unacknowledged message(s)
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) Unhealthy connection!
agent_1  | ERROR:leek.agent.consumer:(Greenlet-0) Error while reading from socket: (9, 'File descriptor was closed in another greenlet')
agent_1  | INFO:leek.agent.consumer:(main) App is ready!
agent_1  | INFO:leek.agent.consumer:(main) Connection revived!
agent_1  | INFO:kombu.mixins:Connected to redis://xxx/0
agent_1  | INFO:leek.agent.consumer:(main) Configuring channel...
agent_1  | INFO:leek.agent.consumer:(main) Channel Configured...
agent_1  | INFO:leek.agent.consumer:(main) Creating consumer...
agent_1  | INFO:leek.agent.consumer:(main) Consumer created!
agent_1  | INFO:leek.agent.consumer:(main) Consumer ready!
^CERROR: Aborting.

Leek version: 0.5.2

Make sure we can select multiple states when filter tasks

Is your feature request related to a problem? Please describe.
Currently I have several tasks that are in Recovered/Failed states and I can't get them all to easily analyze what happned there. This problem could be solved by making Issue reference rlated tasks, but it's not available too. Another case is to get Queued/Received tasks to analyzy what's up with them.

Describe the solution you'd like
If we made filtering by multiple states, then that would solve the issue and it would let me get necessary bunch of tasks.

Describe alternatives you've considered
I have to firstly search by one state and then by another instead of getting everything on one list.

Additional context
empty

Stuck on Heartbeat Event

Hello,

similar to my other issue, leek is again stuck at a malformed heartbeat event and does not process any further.
The Output of the log is:

INFO:leek.agent.consumer:(main) Configuring channel...
INFO:leek.agent.consumer:(main) Channel Configured...
INFO:leek.agent.consumer:(main) Creating consumer...
INFO:leek.agent.consumer:(main) Consumer created!
INFO:leek.agent.consumer:(main) Consumer ready!
WARNING:leek.agent.consumer:(Greenlet-0) b'{"error": {"code": "400002", "title": "Schema Validation Error", "message": "One or more incorrect fields", "reason": "Missing keys: \'active\', \'loadavg\', \'processed\'"}, "message": "Missing keys: \'active\', \'loadavg\', \'processed\'"}\n'
WARNING:leek.agent.consumer:(Greenlet-0) Failed to send message with status code 400, backoff for 5 seconds.
INFO:leek.agent.consumer:(main) Consumer end!

and the malformed message looks like this:

{"hostname": "celery@extraction", "utcoffset": 0, "pid": 1, "clock": 56637, "freq": 5, "sw_ident": "py-celery", "sw_ver": "5.1.2", "sw_sys": "Linux", "timestamp": 1627579274.7250528, "type": "worker-heartbeat"}

Im not really sure why the message is malformed as the docs here https://docs.celeryproject.org/en/stable/userguide/monitoring.html state another format and i really dont know how and why such an event message gets sent.

Sadly leek completely stops when receiving such a message.

EDIT:
i MAY have found the source of this event. Here https://github.com/celery/celery/blob/f02d7c60051ce5202349fe7c795ebf5000d9526d/celery/worker/control.py#L298
a worker-heartbeat is sent, which looks like the message i receive. It has a freq of 5 as an integer and the software info included but none of the other keys (active, loadavg, processed).

Im just not sure, who is triggering this function, but as this seems like a valid celery event message, i assume leek should support it

Only able to see default in the queue tracker

Describe the bug
I am able to see all the tasks from multiple queues however in routing details, regardless of which queue the task belongs to, it shows default. Routing key and exchange details are correct just the queue detail is always default.

To Reproduce
Steps to reproduce the behavior: Hook up leek with rabbitmq celery ev queue

Expected behavior
Exchange : high
Routing key : high
Queue : high

Current behavior
Exchange : high
Routing key : high
Queue :default

Screenshots
Screenshot 2023-06-13 at 3 57 18 PM

Desktop (please complete the following information):

  • OS: Linux
  • Browser [chrome]
  • Celery version [3.1.25]

Many tasks in filter is slow

When using the task name filter, with many task names (eg. 400+), the dropdown really lags. It seems this is a known problem w/ Ant Design's Select dropdown since it does not lazy render. See ant-design/ant-design#10431 and ant-design/ant-design#19328.

It seems this was fixed in v4, but we're already using v4 and ours is still a bit slow? I think this may be due to us passing in the options directly as a lot of children into the Select component instead of as the options prop like so: https://ant.design/components/select/#components-select-demo-big-data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.