How to create a url that shows live logs in meso for the job

I am developing a user interface in which I need to show live logs (stdout and stderr) of jobs running in a slave mesos. I will find out the way I can create a URL that points to the meso logs for the job. Is there any way to do the same? Basically, I need to know the identifier of the slave device, the identifier of the executor, the main identifier, etc. To create a url. Is there any way to find this information?

+5
source share
3 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 to view in the sandbox.

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

See the following mailing list for more details: http://search-hadoop.com/m/RFt15skyLE/Accessing+stdout%252Fstderr+of+a+task+promatmattically

+1
source

How to use the reverse approach. You need to submit live logs from stderr and stdout. How about keeping them out of the slave mesos, for example, to look for elasticity? You will get almost current updates, old magazines are available after, nice search options.

From version 0.27.0, Mesos supports ContainerLogger . You can write your own implementation of ContainerLogger, which will push the logs to the central log repository (Graylog, Logstash, etc), and then expose them in the user interface.

+1
source

Mesos offers a REST interface where you get the information you need. Visit http://<MESOS_MASTER_IP>:5050/help in your browser (using the default port) to check the parameters you request (for example, you can get the necessary information from http://<MESOS_MASTER_IP>:5050/master/state.json) .) Check this link to see a usage example.

0
source

Source: https://habr.com/ru/post/1213964/


All Articles