mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Update defaults.map.jinja
This commit is contained in:
@@ -2,7 +2,12 @@
|
|||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
{% from 'docker/docker.map.jinja' import DOCKER -%}
|
{% from 'docker/docker.map.jinja' import DOCKER -%}
|
||||||
{%- set INFLUXDB_TOKEN = salt['pillar.get']('secrets:influx_token') %}
|
{%- set INFLUXDB_TOKEN = salt['pillar.get']('secrets:influx_token') %}
|
||||||
|
{% if salt['docker.pid']('so-influxdb') > 0 %}
|
||||||
{%- set METRICS_LINK = salt['cmd.run']('so-influxdb-manage dashboardpath "Security Onion Performance"') %}
|
{%- set METRICS_LINK = salt['cmd.run']('so-influxdb-manage dashboardpath "Security Onion Performance"') %}
|
||||||
|
{% else %}
|
||||||
|
{% set METRICS_LINK = '' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% for module, application_url in GLOBALS.application_urls.items() %}
|
{% for module, application_url in GLOBALS.application_urls.items() %}
|
||||||
{% do SOCDEFAULTS.soc.server.modules[module].update({'hostUrl': application_url}) %}
|
{% do SOCDEFAULTS.soc.server.modules[module].update({'hostUrl': application_url}) %}
|
||||||
@@ -20,7 +25,7 @@
|
|||||||
{% do SOCDEFAULTS.soc.server.modules.influxdb.update({'hostUrl': 'https://' ~ GLOBALS.influxdb_host ~ ':8086'}) %}
|
{% do SOCDEFAULTS.soc.server.modules.influxdb.update({'hostUrl': 'https://' ~ GLOBALS.influxdb_host ~ ':8086'}) %}
|
||||||
{% do SOCDEFAULTS.soc.server.modules.influxdb.update({'token': INFLUXDB_TOKEN}) %}
|
{% do SOCDEFAULTS.soc.server.modules.influxdb.update({'token': INFLUXDB_TOKEN}) %}
|
||||||
{% for tool in SOCDEFAULTS.soc.server.client.tools %}
|
{% for tool in SOCDEFAULTS.soc.server.client.tools %}
|
||||||
{% if tool.name == "toolInfluxDb" %}
|
{% if tool.name == "toolInfluxDb" and METRICS_LINK | length > 0 %}
|
||||||
{% do tool.update({'link': METRICS_LINK}) %}
|
{% do tool.update({'link': METRICS_LINK}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user