-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Improvement] global logging options for docker driver #2904
Comments
Is this not possible now with https://www.nomadproject.io/docs/drivers/docker.html#logging ? config {
logging {
type = "syslog"
config {
syslog-address: "udp://1.2.3.4:1111"
tag = "{{.ImageName}}/{{.Name}}"
}
}
} I assume this would work! As an aside, one kind of annoying thing (at least for my use case) is that docker names are a combination of task + uuid. It would be great to either add job + group to the docker name, or have an additional tag that could be added at container creation. It's pretty common for task names to be common across jobs, which can make it difficult to filter. |
@Xopherus it looks like this only works when specified in each job individually. It would be preferable if Docker logging options could be set globally (at least as defaults) for all tasks in the agent configuration. |
Hi. Yes, Driver's global configs (and overriden by each stanza) would be really really useful. Is this on the Nomad roadmap? |
it looks to me like the global docker settings are applied as default, and merged with settings in the job definition. I have:
and my job definition has
and when I do docker inspect of the container on the host machine I get:
perhaps that just needs to be mentioned in the docs? Or maybe some users don't have the option to customize the docker daemon config, but if you do this appears to be a workable approach. |
Hi all, I think I fixed this as part of #10156 -- can you verify and if that is true close this issue? |
Yup, thanks @apollo13! |
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. |
Hi,
In the current implementation there is no simple way to ship logs with additional information like task, group or job names to the central server.
Available options were described here: #2631 (comment)
The most flexible and in fact the only option for central logging is configuring logging per task.
In this case your must configure log options for each tasks.
It's not very easy to keep it in sync with lots of tasks.
I guess it would be much easier to customize logging behavior in the global config.
Something like:
Another option is to implement log forwarding from built-in syslog server to remote or local server with adding tag that contains task/group/job name.
The text was updated successfully, but these errors were encountered: