try:
headers = {'Content-type': 'application/json'}
- response = requests.put(url, headers=headers, json=kibana_content)
+ response = requests.put(url,
+ headers=headers,
+ json=kibana_content,
+ verify=False)
except requests.exceptions.RequestException as exc:
ret['result'] = False
ret['comment'] = ("Failed to create Kibana object {0}\n"
return ret
try:
- response = requests.delete(url)
+ response = requests.delete(url, verify=False)
except requests.exceptions.RequestException as exc:
ret['result'] = False
ret['comment'] = ("Failed to delete Kibana object {0}\n"
if not index:
return False, 'Cannot get the index needed by Kibana client'
- url = "http://{0}/{1}/{2}/{3}".format(url, index, kibana_type, name)
+ url = "{0}/{1}/{2}/{3}".format(url, index, kibana_type, name)
return url, index
host: "{{ server.bind.address }}"
# The Elasticsearch instance to use for all your queries.
-elasticsearch_url: "http://{{ server.database.host }}:{{ server.database.port }}"
+elasticsearch_url: "{{ server.database.get('scheme', 'http') }}://{{ server.database.host }}:{{ server.database.port }}"
+{%- if server.database.get('scheme', 'http') == "https" %}
+elasticsearch.ssl.certificateAuthorities: "/etc/ssl/certs/ca-certificates.crt"
+{%- endif %}
# 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.
host: "{{ server.bind.address }}"
# The Elasticsearch instance to use for all your queries.
-elasticsearch_url: "http://{{ server.database.host }}:{{ server.database.port }}"
+elasticsearch_url: "{{ server.database.get('scheme', 'http') }}://{{ server.database.host }}:{{ server.database.port }}"
+{%- if server.database.get('scheme', 'http') == "https" %}
+elasticsearch.ssl.certificateAuthorities: "/etc/ssl/certs/ca-certificates.crt"
+{%- endif %}
# 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 #################################
# The Elasticsearch instance to use for all your queries.
-elasticsearch.url: "http://{{ server.database.host }}:{{ server.database.port }}"
+elasticsearch.url: "{{ server.database.get('scheme', 'http') }}://{{ server.database.host }}:{{ server.database.port }}"
+
+{%- if server.database.get('scheme', 'http') == "https" %}
+elasticsearch.ssl.certificateAuthorities: "/etc/ssl/certs/ca-certificates.crt"
+{%- endif %}
# If your Elasticsearch is protected with basic authentication,
# these settings provide the username and password that the Kibana
server:
host: 127.0.0.1
port: 9200
+ scheme: http
index: '.kibana'
{%- endload %}
{%- set client = salt['grains.filter_by'](client_defaults, merge=salt['pillar.get']('kibana:client')) %}
kibana:
{%- from "kibana/map.jinja" import client with context %}
kibana:
- kibana_url: {{ client.server.host }}:{{ client.server.port }}
+ kibana_url: {{ client.server.scheme}}://{{ client.server.host }}:{{ client.server.port }}
{%- if client.version == 6 %}
kibana_index: ".kibana6"
{%- else %}
engine: elasticsearch
host: localhost
port: 9200
+ scheme: http