Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate the URL which shows the live logs in mesos for a job

Tags:

docker

mesos

I am developing a UI in which I need to show the live logs (stdout and stderr) of jobs running in a mesos slave. I am finding out a way in which I will be able to generate a URL which will point to the mesos logs for the job. Is there a way to do the same? Basically, I need to know the slave id, executor id, master id etc. for generating the URL. Is there a way to find these information?

like image 227
Surya Kaleeswaran Avatar asked Oct 31 '22 09:10

Surya Kaleeswaran


1 Answers

The sandbox URL is of the form http:// $slave_url:5050/read.json?$work_dir/work/slaves/$slave_id/frameworks/$framework_id/executors/$executor_id/runs/$container_id/stdout, and you can even use the browse.json endpoint to browse around within the sandbox.

Alternatively, you can use the mesos tail $task_id CLI command to access these logs.

For more details, see the following mailing list thread: http://search-hadoop.com/m/RFt15skyLE/Accessing+stdout%252Fstderr+of+a+task+programmattically

like image 161
Adam Avatar answered Nov 15 '22 05:11

Adam