-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from caskolkm/support-server-base-path
Added the new config since kibana 4.2.x, support for custom log file and server.basePath
- Loading branch information
Showing
6 changed files
with
147 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
# * Justin Lambert <mailto:[email protected]> | ||
# | ||
class kibana::config ( | ||
$version = $::kibana::version, | ||
$install_path = $::kibana::install_path, | ||
$port = $::kibana::port, | ||
$bind = $::kibana::bind, | ||
|
@@ -21,17 +22,29 @@ | |
$pid_file = $::kibana::pid_file, | ||
$request_timeout = $::kibana::request_timeout, | ||
$shard_timeout = $::kibana::shard_timeout, | ||
$ping_timeout = $::kibana::ping_timeout, | ||
$startup_timeout = $::kibana::startup_timeout, | ||
$ssl_cert_file = $::kibana::ssl_cert_file, | ||
$ssl_key_file = $::kibana::ssl_key_file, | ||
$verify_ssl = $::kibana::verify_ssl, | ||
$base_path = $::kibana::base_path, | ||
$log_file = $::kibana::log_file, | ||
){ | ||
|
||
if versioncmp($version, '4.2.0') < 0 { | ||
if $base_path { | ||
fail('Kibana config: server.basePath is not supported for kibana 4.1 and lower') | ||
} | ||
$template = 'kibana-4.0-4.1.yml' | ||
} else { | ||
$template = 'kibana-4.2-4.4.yml' | ||
} | ||
|
||
file { "${install_path}/kibana/config/kibana.yml": | ||
ensure => 'file', | ||
owner => 'kibana', | ||
group => 'kibana', | ||
mode => '0440', | ||
content => template('kibana/kibana.yml.erb'), | ||
content => template("kibana/${template}.erb"), | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Kibana is served by a back end server. This controls which port to use. | ||
server.port: <%= @port %> | ||
|
||
# The host to bind the server to. | ||
server.host: "<%= @bind %>" | ||
|
||
# If you are running kibana behind a proxy, and want to mount it at a path, | ||
# specify that path here. The basePath can't end in a slash. | ||
<%- if @base_path -%> | ||
server.basePath: "<%= @base_path %>" | ||
<%- end -%> | ||
|
||
# The Elasticsearch instance to use for all your queries. | ||
elasticsearch.url: "<%= @es_url %>" | ||
|
||
# preserve_elasticsearch_host true will send the hostname specified in `elasticsearch`. If you set it to false, | ||
# then the host you use to connect to *this* Kibana instance will be sent. | ||
elasticsearch.preserveHost: <%= @es_preserve_host %> | ||
|
||
# Kibana uses an index in Elasticsearch to store saved searches, visualizations | ||
# and dashboards. It will create a new index if it doesn't already exist. | ||
kibana.index: "<%= @kibana_index %>" | ||
|
||
# The default application to load. | ||
kibana.defaultAppId: "<%= @default_app_id %>" | ||
|
||
# If your Elasticsearch is protected with basic auth, these are the user credentials | ||
# used by the Kibana server to perform maintenance on the kibana_index at startup. Your Kibana | ||
# users will still need to authenticate with Elasticsearch (which is proxied through | ||
# the Kibana server) | ||
<%- if @elasticsearch_username -%> | ||
elasticsearch.username: <%= @elasticsearch_username %> | ||
<%- end -%> | ||
<%- if @elasticsearch_password -%> | ||
elasticsearch.password: <%= @elasticsearch_password %> | ||
<%- end -%> | ||
|
||
# SSL for outgoing requests from the Kibana Server to the browser (PEM formatted) | ||
<%- if @ssl_key_file -%> | ||
server.ssl.key: <%= @ssl_key_file %> | ||
<%- end -%> | ||
|
||
<%- if @ssl_cert_file -%> | ||
server.ssl.cert: <%= @ssl_cert_file %> | ||
<%- end -%> | ||
|
||
# If you need to provide a CA certificate for your Elasticsearch instance, put | ||
# the path of the pem file here. | ||
<%- if @ca_cert -%> | ||
elasticsearch.ssl.ca: <%= @ca_cert %> | ||
<%- end -%> | ||
|
||
# Set to false to have a complete disregard for the validity of the SSL | ||
# certificate. | ||
elasticsearch.ssl.verify: <%= @verify_ssl %> | ||
|
||
# Time in milliseconds to wait for elasticsearch to respond to pings, defaults to | ||
# request_timeout setting | ||
elasticsearch.pingTimeout: <%= @ping_timeout %> | ||
|
||
# Time in milliseconds to wait for responses from the back end or elasticsearch. | ||
# This must be > 0 | ||
elasticsearch.requestTimeout: <%= @request_timeout %> | ||
|
||
# Time in milliseconds for Elasticsearch to wait for responses from shards. | ||
# Set to 0 to disable. | ||
elasticsearch.shardTimeout: <%= @shard_timeout %> | ||
|
||
# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying | ||
elasticsearch.startupTimeout: <%= @startup_timeout %> | ||
|
||
# Set the path to where you would like the process id file to be created. | ||
pid.file: <%= @pid_file %> | ||
|
||
# If you would like to send the log output to a file you can set the path below. | ||
logging.dest: <%= @log_file %> |