diff --git a/salt/elasticfleet/manager.sls b/salt/elasticfleet/manager.sls index a0aa83460..c9fe91d4d 100644 --- a/salt/elasticfleet/manager.sls +++ b/salt/elasticfleet/manager.sls @@ -9,7 +9,7 @@ include: - elasticfleet.config - - kibana.healthcheck + - kibana.enabled # If enabled, automatically update Fleet Logstash Outputs {% if ELASTICFLEETMERGED.config.server.enable_auto_configuration %} diff --git a/salt/kibana/enabled.sls b/salt/kibana/enabled.sls index 4bb5fef9c..a2fb6cde9 100644 --- a/salt/kibana/enabled.sls +++ b/salt/kibana/enabled.sls @@ -6,11 +6,11 @@ {% from 'allowed_states.map.jinja' import allowed_states %} {% if sls.split('.')[0] in allowed_states %} {% from 'docker/docker.map.jinja' import DOCKERMERGED %} +{% from 'elasticsearch/config.map.jinja' import ELASTICSEARCHMERGED %} {% from 'vars/globals.map.jinja' import GLOBALS %} include: - kibana.config - - kibana.healthcheck - kibana.sostatus # Start the kibana docker @@ -60,8 +60,19 @@ so-kibana: {% endif %} - watch: - file: kibanaconfig - - require_in: - - http: wait_for_so-kibana + +wait_for_so-kibana: + http.wait_for_successful_query: + - name: "http://localhost:5601/api/status" + - username: 'so_elastic' + - password: '{{ ELASTICSEARCHMERGED.auth.users.so_elastic_user.pass }}' + - ssl: True + - verify_ssl: False + - status: 200 + - wait_for: 300 + - request_interval: 15 + - require: + - docker_container: so-kibana delete_so-kibana_so-status.disabled: file.uncomment: diff --git a/salt/kibana/healthcheck.sls b/salt/kibana/healthcheck.sls deleted file mode 100644 index bfeb633c5..000000000 --- a/salt/kibana/healthcheck.sls +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one -# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at -# https://securityonion.net/license; you may not use this file except in compliance with the -# Elastic License 2.0. - -{% from 'allowed_states.map.jinja' import allowed_states %} -{% if sls.split('.')[0] in allowed_states %} -{% from 'elasticsearch/config.map.jinja' import ELASTICSEARCHMERGED %} - -wait_for_so-kibana: - http.wait_for_successful_query: - - name: "http://localhost:5601/api/status" - - username: 'so_elastic' - - password: '{{ ELASTICSEARCHMERGED.auth.users.so_elastic_user.pass }}' - - ssl: True - - verify_ssl: False - - status: 200 - - wait_for: 300 - - request_interval: 15 - -{% else %} - -{{sls}}_state_not_allowed: - test.fail_without_changes: - - name: {{sls}}_state_not_allowed - -{% endif %}