Add awslogs driver for Amazon CloudWatch Logs

Signed-off-by: Samuel Karp <skarp@amazon.com>
This commit is contained in:
Samuel Karp 2015-08-05 00:35:06 +00:00 committed by Tibor Vass
parent e8447c157d
commit 0d2d916b13
6 changed files with 10 additions and 5 deletions

View File

@ -279,6 +279,7 @@ __docker_log_driver_options() {
local gelf_options="gelf-address gelf-tag" local gelf_options="gelf-address gelf-tag"
local json_file_options="max-file max-size" local json_file_options="max-file max-size"
local syslog_options="syslog-address syslog-facility syslog-tag" local syslog_options="syslog-address syslog-facility syslog-tag"
local awslogs_options="awslogs-region awslogs-group awslogs-stream"
case $(__docker_value_of_option --log-driver) in case $(__docker_value_of_option --log-driver) in
'') '')
@ -296,6 +297,9 @@ __docker_log_driver_options() {
syslog) syslog)
COMPREPLY=( $( compgen -W "$syslog_options" -S = -- "$cur" ) ) COMPREPLY=( $( compgen -W "$syslog_options" -S = -- "$cur" ) )
;; ;;
awslogs)
COMPREPLY=( $( compgen -W "$awslogs_options" -S = -- "$cur" ) )
;;
*) *)
return return
;; ;;

View File

@ -238,7 +238,7 @@ __docker_subcommand() {
"($help)--ipc=-[IPC namespace to use]:IPC namespace: " "($help)--ipc=-[IPC namespace to use]:IPC namespace: "
"($help)*--link=-[Add link to another container]:link:->link" "($help)*--link=-[Add link to another container]:link:->link"
"($help)*"{-l,--label=-}"[Set meta data on a container]:label: " "($help)*"{-l,--label=-}"[Set meta data on a container]:label: "
"($help)--log-driver=-[Default driver for container logs]:Logging driver:(json-file syslog journald gelf fluentd none)" "($help)--log-driver=-[Default driver for container logs]:Logging driver:(json-file syslog journald gelf fluentd awslogs none)"
"($help)*--log-opt=-[Log driver specific options]:log driver options: " "($help)*--log-opt=-[Log driver specific options]:log driver options: "
"($help)*--lxc-conf=-[Add custom lxc options]:lxc options: " "($help)*--lxc-conf=-[Add custom lxc options]:lxc options: "
"($help)--mac-address=-[Container MAC address]:MAC address: " "($help)--mac-address=-[Container MAC address]:MAC address: "
@ -617,7 +617,7 @@ _docker() {
"($help)--ipv6[Enable IPv6 networking]" \ "($help)--ipv6[Enable IPv6 networking]" \
"($help -l --log-level)"{-l,--log-level=-}"[Set the logging level]:level:(debug info warn error fatal)" \ "($help -l --log-level)"{-l,--log-level=-}"[Set the logging level]:level:(debug info warn error fatal)" \
"($help)*--label=-[Set key=value labels to the daemon]:label: " \ "($help)*--label=-[Set key=value labels to the daemon]:label: " \
"($help)--log-driver=-[Default driver for container logs]:Logging driver:(json-file syslog journald gelf fluentd none)" \ "($help)--log-driver=-[Default driver for container logs]:Logging driver:(json-file syslog journald gelf fluentd awslogs none)" \
"($help)*--log-opt=-[Log driver specific options]:log driver options: " \ "($help)*--log-opt=-[Log driver specific options]:log driver options: " \
"($help)--mtu=-[Set the containers network MTU]:mtu:(0 576 1420 1500 9000)" \ "($help)--mtu=-[Set the containers network MTU]:mtu:(0 576 1420 1500 9000)" \
"($help -p --pidfile)"{-p,--pidfile=-}"[Path to use for daemon PID file]:PID file:_files" \ "($help -p --pidfile)"{-p,--pidfile=-}"[Path to use for daemon PID file]:PID file:_files" \

View File

@ -1011,6 +1011,7 @@ container's logging driver. The following options are supported:
| `journald` | Journald logging driver for Docker. Writes log messages to `journald`. | | `journald` | Journald logging driver for Docker. Writes log messages to `journald`. |
| `gelf` | Graylog Extended Log Format (GELF) logging driver for Docker. Writes log messages to a GELF endpoint likeGraylog or Logstash. | | `gelf` | Graylog Extended Log Format (GELF) logging driver for Docker. Writes log messages to a GELF endpoint likeGraylog or Logstash. |
| `fluentd` | Fluentd logging driver for Docker. Writes log messages to `fluentd` (forward input). | | `fluentd` | Fluentd logging driver for Docker. Writes log messages to `fluentd` (forward input). |
| `awslogs` | Amazon CloudWatch Logs logging driver for Docker. Writes log messages to Amazon CloudWatch Logs |
The `docker logs`command is available only for the `json-file` logging The `docker logs`command is available only for the `json-file` logging
driver. For detailed information on working with logging drivers, see driver. For detailed information on working with logging drivers, see

View File

@ -168,7 +168,7 @@ millions of trillions.
Add link to another container in the form of <name or id>:alias or just Add link to another container in the form of <name or id>:alias or just
<name or id> in which case the alias will match the name. <name or id> in which case the alias will match the name.
**--log-driver**="|*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*none*" **--log-driver**="|*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*none*"
Logging driver for container. Default is defined by daemon `--log-driver` flag. Logging driver for container. Default is defined by daemon `--log-driver` flag.
**Warning**: `docker logs` command works only for `json-file` logging driver. **Warning**: `docker logs` command works only for `json-file` logging driver.

View File

@ -268,7 +268,7 @@ which interface and port to use.
**--lxc-conf**=[] **--lxc-conf**=[]
(lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1" (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
**--log-driver**="|*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*none*" **--log-driver**="|*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*none*"
Logging driver for container. Default is defined by daemon `--log-driver` flag. Logging driver for container. Default is defined by daemon `--log-driver` flag.
**Warning**: `docker logs` command works only for `json-file` logging driver. **Warning**: `docker logs` command works only for `json-file` logging driver.

View File

@ -119,7 +119,7 @@ unix://[/path/to/socket] to use.
**--label**="[]" **--label**="[]"
Set key=value labels to the daemon (displayed in `docker info`) Set key=value labels to the daemon (displayed in `docker info`)
**--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*none*" **--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*none*"
Default driver for container logs. Default is `json-file`. Default driver for container logs. Default is `json-file`.
**Warning**: `docker logs` command works only for `json-file` logging driver. **Warning**: `docker logs` command works only for `json-file` logging driver.