kibanaのdocker環境変数の調べ方

docker hubのkibanaを確認しても、docker環境変数がほとんど記載されていないため、どのようなパラメータが使えるかの確認方法です。

https://hub.docker.com/_/kibana

ひとまず、コンテナを作成した後

sudo docker inspect kibana | less

下図のようにCmd部分で「/usr/local/bin/kibana-docker」となっているのを確認します。

 "Cmd": [
    "/usr/local/bin/kibana-docker"
 ],

kibanaに接続します。

 sudo docker exec -it kibana /bin/bash

/usr/local/bin/kibana-dockerを確認します。

cat /usr/local/bin/kibana-docker

kibanaのバージョン7.12.1では以下がdocker環境変数として使えるようです。

実際にdocker環境変数として使う場合は、

kibana_varsの値を「env_var=$(echo ${kibana_var^^} | tr . _)」しているので

例えば「elasticsearch.hosts」は「ELASTICSEARCH_HOSTS」と入力し、大文字かつ.は_とする必要があります。

kibana_vars=(
    apm_oss.apmAgentConfigurationIndex
    apm_oss.errorIndices
    apm_oss.indexPattern
    apm_oss.metricsIndices
    apm_oss.onboardingIndices
    apm_oss.sourcemapIndices
    apm_oss.spanIndices
    apm_oss.transactionIndices
    console.enabled
    console.proxyConfig
    console.proxyFilter
    cpu.cgroup.path.override
    cpuacct.cgroup.path.override
    csp.rules
    csp.strict
    csp.warnLegacyBrowsers
    elasticsearch.customHeaders
    elasticsearch.hosts
    elasticsearch.logQueries
    elasticsearch.password
    elasticsearch.pingTimeout
    elasticsearch.requestHeadersWhitelist
    elasticsearch.requestTimeout
    elasticsearch.shardTimeout
    elasticsearch.sniffInterval
    elasticsearch.sniffOnConnectionFault
    elasticsearch.sniffOnStart
    elasticsearch.ssl.alwaysPresentCertificate
    elasticsearch.ssl.certificate
    elasticsearch.ssl.certificateAuthorities
    elasticsearch.ssl.key
    elasticsearch.ssl.keyPassphrase
    elasticsearch.ssl.keystore.password
    elasticsearch.ssl.keystore.path
    elasticsearch.ssl.truststore.password
    elasticsearch.ssl.truststore.path
    elasticsearch.ssl.verificationMode
    elasticsearch.username
    enterpriseSearch.accessCheckTimeout
    enterpriseSearch.accessCheckTimeoutWarning
    enterpriseSearch.enabled
    enterpriseSearch.host
    i18n.locale
    interpreter.enableInVisualize
    kibana.autocompleteTerminateAfter
    kibana.autocompleteTimeout
    kibana.defaultAppId
    kibana.index
    logging.dest
    logging.json
    logging.quiet
    logging.rotate.enabled
    logging.rotate.everyBytes
    logging.rotate.keepFiles
    logging.rotate.pollingInterval
    logging.rotate.usePolling
    logging.silent
    logging.useUTC
    logging.verbose
    map.includeElasticMapsService
    map.proxyElasticMapsServiceInMaps
    map.regionmap
    map.tilemap.options.attribution
    map.tilemap.options.maxZoom
    map.tilemap.options.minZoom
    map.tilemap.options.subdomains
    map.tilemap.url
    migrations.batchSize
    migrations.enableV2
    migrations.pollInterval
    migrations.scrollDuration
    migrations.skip
    monitoring.cluster_alerts.email_notifications.email_address
    monitoring.enabled
    monitoring.kibana.collection.enabled
    monitoring.kibana.collection.interval
    monitoring.ui.container.elasticsearch.enabled
    monitoring.ui.container.logstash.enabled
    monitoring.ui.elasticsearch.hosts
    monitoring.ui.elasticsearch.logFetchCount
    monitoring.ui.elasticsearch.password
    monitoring.ui.elasticsearch.pingTimeout
    monitoring.ui.elasticsearch.ssl.certificateAuthorities
    monitoring.ui.elasticsearch.ssl.verificationMode
    monitoring.ui.elasticsearch.username
    monitoring.ui.enabled
    monitoring.ui.max_bucket_size
    monitoring.ui.min_interval_seconds
    newsfeed.enabled
    ops.cGroupOverrides.cpuAcctPath
    ops.cGroupOverrides.cpuPath
    ops.interval
    path.data
    pid.file
    regionmap
    security.showInsecureClusterWarning
    server.basePath
    server.compression.enabled
    server.compression.referrerWhitelist
    server.cors
    server.cors.origin
    server.customResponseHeaders
    server.customResponseHeaders
    server.defaultRoute
    server.host
    server.keepAliveTimeout
    server.maxPayloadBytes
    server.name
    server.port
    server.rewriteBasePath
    server.socketTimeout
    server.ssl.cert
    server.ssl.certificate
    server.ssl.certificateAuthorities
    server.ssl.cipherSuites
    server.ssl.clientAuthentication
    server.ssl.enabled
    server.ssl.key
    server.ssl.keyPassphrase
    server.ssl.keystore.password
    server.ssl.keystore.path
    server.ssl.redirectHttpFromPort
    server.ssl.supportedProtocols
    server.ssl.truststore.password
    server.ssl.truststore.path
    server.xsrf.disableProtection
    server.xsrf.whitelist
    status.allowAnonymous
    status.v6ApiFormat
    telemetry.allowChangingOptInStatus
    telemetry.enabled
    telemetry.optIn
    telemetry.optInStatusUrl
    telemetry.sendUsageFrom
    tilemap.options.attribution
    tilemap.options.maxZoom
    tilemap.options.minZoom
    tilemap.options.subdomains
    tilemap.url
    timelion.enabled
    vega.enableExternalUrls
    xpack.actions.allowedHosts
    xpack.actions.enabled
    xpack.actions.enabledActionTypes
    xpack.actions.preconfigured
    xpack.actions.proxyHeaders
    xpack.actions.proxyRejectUnauthorizedCertificates
    xpack.actions.proxyUrl
    xpack.actions.rejectUnauthorized
    xpack.actions.maxResponseContentLength
    xpack.actions.responseTimeout
    xpack.alerts.healthCheck.interval
    xpack.alerts.invalidateApiKeysTask.interval
    xpack.alerts.invalidateApiKeysTask.removalDelay
    xpack.apm.enabled
    xpack.apm.serviceMapEnabled
    xpack.apm.ui.enabled
    xpack.apm.ui.maxTraceItems
    xpack.apm.ui.transactionGroupBucketSize
    xpack.canvas.enabled
    xpack.code.disk.thresholdEnabled
    xpack.code.disk.watermarkLow
    xpack.code.indexRepoFrequencyMs
    xpack.code.lsp.verbose
    xpack.code.maxWorkspace
    xpack.code.security.enableGitCertCheck
    xpack.code.security.gitHostWhitelist
    xpack.code.security.gitProtocolWhitelist
    xpack.code.ui.enabled
    xpack.code.updateRepoFrequencyMs
    xpack.code.verbose
    xpack.encryptedSavedObjects.encryptionKey
    xpack.encryptedSavedObjects.keyRotation.decryptionOnlyKeys
    xpack.event_log.enabled
    xpack.event_log.indexEntries
    xpack.event_log.logEntries
    xpack.fleet.agents.elasticsearch.host
    xpack.fleet.agents.kibana.host
    xpack.fleet.agents.tlsCheckDisabled
    xpack.fleet.registryUrl
    xpack.graph.canEditDrillDownUrls
    xpack.graph.enabled
    xpack.graph.savePolicy
    xpack.grokdebugger.enabled
    xpack.infra.enabled
    xpack.infra.query.partitionFactor
    xpack.infra.query.partitionSize
    xpack.infra.sources.default.fields.container
    xpack.infra.sources.default.fields.host
    xpack.infra.sources.default.fields.message
    xpack.infra.sources.default.fields.pod
    xpack.infra.sources.default.fields.tiebreaker
    xpack.infra.sources.default.fields.timestamp
    xpack.infra.sources.default.logAlias
    xpack.infra.sources.default.metricAlias
    xpack.ingestManager.fleet.tlsCheckDisabled
    xpack.ingestManager.registryUrl
    xpack.license_management.enabled
    xpack.maps.enabled
    xpack.maps.showMapVisualizationTypes
    xpack.ml.enabled
    xpack.reporting.capture.browser.autoDownload
    xpack.reporting.capture.browser.chromium.disableSandbox
    xpack.reporting.capture.browser.chromium.inspect
    xpack.reporting.capture.browser.chromium.maxScreenshotDimension
    xpack.reporting.capture.browser.chromium.proxy.bypass
    xpack.reporting.capture.browser.chromium.proxy.enabled
    xpack.reporting.capture.browser.chromium.proxy.server
    xpack.reporting.capture.browser.type
    xpack.reporting.capture.concurrency
    xpack.reporting.capture.loadDelay
    xpack.reporting.capture.maxAttempts
    xpack.reporting.capture.settleTime
    xpack.reporting.capture.timeout
    xpack.reporting.capture.timeouts.openUrl
    xpack.reporting.capture.timeouts.renderComplete
    xpack.reporting.capture.timeouts.waitForElements
    xpack.reporting.capture.viewport.height
    xpack.reporting.capture.viewport.width
    xpack.reporting.capture.zoom
    xpack.reporting.csv.checkForFormulas
    xpack.reporting.csv.enablePanelActionDownload
    xpack.reporting.csv.escapeFormulaValues
    xpack.reporting.csv.maxSizeBytes
    xpack.reporting.csv.scroll.duration
    xpack.reporting.csv.scroll.size
    xpack.reporting.csv.useByteOrderMarkEncoding
    xpack.reporting.enabled
    xpack.reporting.encryptionKey
    xpack.reporting.index
    xpack.reporting.kibanaApp
    xpack.reporting.kibanaServer.hostname
    xpack.reporting.kibanaServer.port
    xpack.reporting.kibanaServer.protocol
    xpack.reporting.poll.jobCompletionNotifier.interval
    xpack.reporting.poll.jobCompletionNotifier.intervalErrorMultiplier
    xpack.reporting.poll.jobsRefresh.interval
    xpack.reporting.poll.jobsRefresh.intervalErrorMultiplier
    xpack.reporting.queue.indexInterval
    xpack.reporting.queue.pollEnabled
    xpack.reporting.queue.pollInterval
    xpack.reporting.queue.pollIntervalErrorMultiplier
    xpack.reporting.queue.timeout
    xpack.reporting.roles.allow
    xpack.rollup.enabled
    xpack.searchprofiler.enabled
    xpack.security.audit.enabled
    xpack.security.audit.appender.type
    xpack.security.audit.appender.layout.type
    xpack.security.audit.appender.layout.highlight
    xpack.security.audit.appender.layout.pattern
    xpack.security.audit.appender.legacyLoggingConfig
    xpack.security.audit.appender.fileName
    xpack.security.audit.appender.policy.type
    xpack.security.audit.appender.policy.interval
    xpack.security.audit.appender.policy.modulate
    xpack.security.audit.appender.policy.size
    xpack.security.audit.appender.strategy.type
    xpack.security.audit.appender.strategy.max
    xpack.security.audit.appender.strategy.pattern
    xpack.security.audit.ignore_filters
    xpack.security.authc.oidc.realm
    xpack.security.authc.providers
    xpack.security.authc.saml.maxRedirectURLSize
    xpack.security.authc.saml.realm
    xpack.security.authc.selector.enabled
    xpack.security.authProviders
    xpack.security.cookieName
    xpack.security.enabled
    xpack.security.encryptionKey
    xpack.security.loginAssistanceMessage
    xpack.security.loginAssistanceMessage
    xpack.security.loginHelp
    xpack.security.public.hostname
    xpack.security.public.port
    xpack.security.public.protocol
    xpack.security.sameSiteCookies
    xpack.security.secureCookies
    xpack.security.session.cleanupInterval
    xpack.security.session.idleTimeout
    xpack.security.session.lifespan
    xpack.security.sessionTimeout
    xpack.spaces.enabled
    xpack.spaces.maxSpaces
    xpack.task_manager.enabled
    xpack.task_manager.index
    xpack.task_manager.max_attempts
    xpack.task_manager.max_poll_inactivity_cycles
    xpack.task_manager.max_workers
    xpack.task_manager.monitored_aggregated_stats_refresh_rate
    xpack.task_manager.monitored_stats_required_freshness
    xpack.task_manager.monitored_stats_running_average_window
    xpack.task_manager.monitored_task_execution_thresholds
    xpack.task_manager.poll_interval
    xpack.task_manager.request_capacity
    xpack.task_manager.version_conflict_threshold
)

https://www.elastic.co/guide/en/kibana/current/docker.html

での実行例は以下のようになります。

docker run --name kib01-test --net elastic -p 5601:5601 -e "ELASTICSEARCH_HOSTS=http://es01-test:9200" docker.elastic.co/kibana/kibana:7.13.1