-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP endpoint to tail job logs, stdout, and stderr #277
Comments
@jippi Thanks for the suggestion. We would like to support this because it is a super convenient way to debug things on a small cluster. In a large scale environment we recommend using centralized logging. |
+1 On a side note, having the ability to shove this output somewhere in the job definition (like logspout with docker) for 12 factor apps would be nice. |
I would point to heka, since the docker log input allows to get all the logs with a simple configuration setting. http://hekad.readthedocs.org/en/v0.10.0b1/config/inputs/docker_log.html If you don't like to get the container name as log source, you can add any information you need from the environment variables. (Adding a name_from_env_var, like 'TASK_NAME' will return the value if found instead of the container name). That way you have a centralized log easily without over configuration. Hope this helps. |
From #475
|
@rvm2015 Our expectation is that you will have a log shipping agent setup on the host, or co-scheduled in your task group. Can you give us some specific examples of configuration you need to specify that is currently not available in Nomad? |
@cbednarski I cannot speak for @rvm2015 however a simple use case for this would be getting the logs for said shipping agent without having to go to a node that is somewhere on your cluster to get them. Also there are a lot of times where logs coming out of stdout/stderr or much different than the ones coming out via log files. This can be invaluable when trying to debug why an application seemingly inexplicably died. |
@supernomad Our logging feature, coming with Nomad 0.3 will allow you to stream logs and view the file system of an allocation with Nomad cli. You won't need to go to a Node to stream logs out of the tasks running on allocations in that Node. The UX is going to be something like this -
Hope this works for you? |
@diptanu That will work perfectly, but I have two questions. First would there be a way to get the logs from all active allocations? Also, is there any kind of timeline on 0.3? |
@supernomad Yes, you can get logs from all allocations which are still present on the nomad clients. And regarding 0.3, very soon! We are getting into the crunch mode to get the release out. |
@diptanu I'd prefer --follow flag to be added to |
Would there be any possibility this could be added to nomad? I'm trying to debug a particularly difficult issue with the Rkt driver and it would be very helpful to have this output while trying to determine if the problem is the ACI or the driver. Thank you. |
Still on the roadmap! But won't be in 0.4.0 |
+1. here i have a failed task with 0 stderr or stdout
|
Ah this is actually done! @type0lang You may have that if it never produce logs because it failed to start (see |
@dadgar Ideally |
You can do that using nomad fs command. If you do -f it will follow the
|
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Would be a nice addition for easy debugging
I realise non-nomad version of this would be to pipe everything to syslog or similar, but it requires a few more moving parts
The text was updated successfully, but these errors were encountered: