LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

Jobs monitor

Open pmarini-nc opened this issue 10 months ago • 7 comments

Is your feature request related to a problem? Please describe.

In my LocalAI use case, users send tasks through the Nextcloud Assistant and the OpenAI and LocalAI Integration.

The tasks:

  • can be of different type: transcription, summaries, chatting .. and can require long time to complete.
  • can come concurrently and from multiple instances so that I'd like to know how and when these tasks are executing, the resources they are using.

Currently I don't have a way to know the tasks currently running in LocalAI.

Describe the solution you'd like

It would be great to have a way to monitor the jobs that are sent to LocalAI. The way I think it would useful, is to have a Linux top-like command in which I can see information about running jobs:

  • job id
  • job status: executing, queued ...
  • start time
  • command
  • backend
  • model
  • client (IP and / or user agent)

Other interesting features that could be considered:

  • To have a way to kill a job.
  • Be able to see past jobs with their start and end times.
  • To have this monitoring panel in the Web UI

Describe alternatives you've considered I had a look at the endpoint /backends/jobs but I get a "Resource not found" error (also reported here).

Additional context I'm not sure if what I'm asking is already possible with current API, but as mentioned just above my attempts were unsuccessful.

pmarini-nc avatar Jan 07 '26 14:01 pmarini-nc

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 08 '26 02:04 github-actions[bot]

Jobs monitoring is now exposed in the UI under /app/traces, that's a great enhancement!

Image

However, I think it is lacking some information / functionality:

  • in my tests, traces appears once the job is over, meaning there is no way to monitor live requests. Is this expected?
  • timestamp is lacking the date part
  • fields are not sortable
  • now that the platform supports authentication and quotas, it would be very useful to add a field containing the user.
  • there is no information about the client IP / user agent
  • for me is not clear why there are two panes API Traces and Backend Traces

I'm not sure if these features are under evaluation and coming in the future. As there different aspects if you want me to open a feature request per item, I'd be happy to do that.

Thanks!

pmarini-nc avatar Apr 10 '26 16:04 pmarini-nc

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 10 '26 02:07 github-actions[bot]

Not answered yet

pmarini-nc avatar Jul 10 '26 06:07 pmarini-nc

I’m picking up one bounded part of this issue: I’ll update the current traces UI on latest master to show full date-and-time timestamps and make the existing API/backend trace columns sortable, with focused regression coverage. Live in-flight traces and new user/client attribution require backend/API work and are intentionally out of scope for this PR.

localai-org-maint-bot avatar Aug 05 '26 02:08 localai-org-maint-bot

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 04 '26 01:11 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Nov 09 '26 02:11 github-actions[bot]