Splunk Logging Driver: formats and verifyconnection

`--log-opt splunk-format=inline|json|raw` allows to change how logging
driver sends data to Splunk, where

`inline` - default value, format used before, message is injected as a
line in JSON payload
`json` - driver will try to parse each line as a JSON object and embed it
inside of the JSON payload
`raw` - driver will send Raw payload instead of JSON, tag and attributes
will be prefixed before the message

`--log-opt splunk-verify-connection=true|false` - allows to skip
verification for Splunk Url

Signed-off-by: Denis Gladkikh <denis@gladkikh.email>
This commit is contained in:
Denis Gladkikh 2016-06-09 21:06:44 -07:00 committed by Tibor Vass
parent ed38ec18bf
commit 7225cc5604
2 changed files with 7 additions and 3 deletions

View File

@ -520,7 +520,7 @@ __docker_complete_log_options() {
local journald_options="env labels tag" local journald_options="env labels tag"
local json_file_options="env labels max-file max-size" local json_file_options="env labels max-file max-size"
local syslog_options="env labels syslog-address syslog-facility syslog-format syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify tag" local syslog_options="env labels syslog-address syslog-facility syslog-format syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify tag"
local splunk_options="env labels splunk-caname splunk-capath splunk-index splunk-insecureskipverify splunk-source splunk-sourcetype splunk-token splunk-url tag" local splunk_options="env labels splunk-caname splunk-capath splunk-format splunk-index splunk-insecureskipverify splunk-source splunk-sourcetype splunk-token splunk-url splunk-verify-connection tag"
local all_options="$fluentd_options $gcplogs_options $gelf_options $journald_options $json_file_options $syslog_options $splunk_options" local all_options="$fluentd_options $gcplogs_options $gelf_options $journald_options $json_file_options $syslog_options $splunk_options"
@ -629,10 +629,14 @@ __docker_complete_log_driver_options() {
__ltrim_colon_completions "${cur}" __ltrim_colon_completions "${cur}"
return return
;; ;;
splunk-insecureskipverify) splunk-insecureskipverify|splunk-verify-connection)
COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) ) COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
return return
;; ;;
splunk-format)
COMPREPLY=( $( compgen -W "inline json raw" -- "${cur##*=}" ) )
return
;;
esac esac
return 1 return 1
} }

View File

@ -228,7 +228,7 @@ __docker_get_log_options() {
journald_options=("env" "labels" "tag") journald_options=("env" "labels" "tag")
json_file_options=("env" "labels" "max-file" "max-size") json_file_options=("env" "labels" "max-file" "max-size")
syslog_options=("env" "labels" "syslog-address" "syslog-facility" "syslog-format" "syslog-tls-ca-cert" "syslog-tls-cert" "syslog-tls-key" "syslog-tls-skip-verify" "tag") syslog_options=("env" "labels" "syslog-address" "syslog-facility" "syslog-format" "syslog-tls-ca-cert" "syslog-tls-cert" "syslog-tls-key" "syslog-tls-skip-verify" "tag")
splunk_options=("env" "labels" "splunk-caname" "splunk-capath" "splunk-index" "splunk-insecureskipverify" "splunk-source" "splunk-sourcetype" "splunk-token" "splunk-url" "tag") splunk_options=("env" "labels" "splunk-caname" "splunk-capath" "splunk-format" "splunk-index" "splunk-insecureskipverify" "splunk-source" "splunk-sourcetype" "splunk-token" "splunk-url" "splunk-verify-connection" "tag")
[[ $log_driver = (awslogs|all) ]] && _describe -t awslogs-options "awslogs options" awslogs_options "$@" && ret=0 [[ $log_driver = (awslogs|all) ]] && _describe -t awslogs-options "awslogs options" awslogs_options "$@" && ret=0
[[ $log_driver = (fluentd|all) ]] && _describe -t fluentd-options "fluentd options" fluentd_options "$@" && ret=0 [[ $log_driver = (fluentd|all) ]] && _describe -t fluentd-options "fluentd options" fluentd_options "$@" && ret=0