jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

Is is possible to get notebook idle status outside of jupyter notebook #470

Closed aisensiy closed 5 years ago

aisensiy commented 5 years ago

I have some jupyter notebooks to manage for some users. And all of them created in kubernetes as a pod without using jupyterhub and there is some other sidecars (functions like sync data, sync logs). And I want to shutdown jupyter notebooks which are idle for some period.

I know there is a shutdown_no_activity_timeout configuration in notebook but it just means to shutdown the notebook not the whole kubernetes pod. I do want to access jupyter notebook server status like this and trigger my own workflow to clean the jupyter notebook from kubernetes. So is that possible to access the jupyter notebook status to determine if the status of jupyter notebook server?

minrk commented 5 years ago

The /api/status endpoint of a notebook server gives you some status info, and /api/kernels gives you more detailed info of current kernels.