jan icon indicating copy to clipboard operation
jan copied to clipboard

epic: Jan has better Hardware Monitoring (e.g. Prometheus Exporter, etc)

Open dan-menlo opened this issue 1 year ago • 2 comments

Kanban

https://github.com/orgs/janhq/projects/5/views/7?filterQuery=milestone%3A%22Jan+has+System+Monitor%22

System Monitor

Questions

  • [ ] Are we able to do a Prometheus/Grafana-style time series dashboard? (How do we even persist the data on flat files?)
  • [ ] Or: do we ship with a Prometheus exporter for Jan Server implementations

Tasklist

  • [ ] https://github.com/janhq/jan/issues/287
  • [x] https://github.com/janhq/jan/issues/286
  • [ ] https://github.com/janhq/jan/pull/663

dan-menlo avatar Dec 12 '23 09:12 dan-menlo

@dan-jan , I'm not proficient with Prometheus and Grafana yet so will need to play with it a bit. I do see that Prometheus has a npm package: https://github.com/siimon/prom-client which can help us to export metrics to Prometheus.

namchuai avatar Dec 18 '23 01:12 namchuai

According to our discussion with @louis-jan @vuonghoainam , we are about to packaging prometheus binary into Jan's extensions (just like how we did with nitro).

Jan will serve metrics at :1337/metrics

High level design: CleanShot_2023-12-18_at_11 17 41

Work breakdown

  • [ ] Integrate with prom-client (npm package) and serve metrics at :1337/metrics
  • [ ] Packaging Prometheus binary according ABI (mac/windows/linux and corresponding chip arm/x86)
  • [ ] Define metrics that are needed (RAM, CPU, GPU usage, etc.)
  • [ ] Collect those defined metrics and expose it via :1337/metrics

If I'm missing something, please let me know. Thank you! cc @louis-jan @vuonghoainam ,

namchuai avatar Dec 18 '23 04:12 namchuai