Merge pull request #5270 from Security-Onion-Solutions/grafana_fleet_hotfix

Grafana fleet hotfix
This commit is contained in:
Josh Patterson
2021-08-23 13:10:35 -04:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

2
HOTFIX
View File

@@ -1,2 +1,2 @@
CURATOR CURATOR GRAFANA_DASH_ALLOW

View File

@@ -12,16 +12,21 @@
{% if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone'] or (grains.role == 'so-eval' and GRAFANA == 1) %} {% if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone'] or (grains.role == 'so-eval' and GRAFANA == 1) %}
{% set ALLOWED_DASHBOARDS = ['overview', 'standalone', 'manager', 'managersearch', 'sensor', 'searchnode', 'heavynode', 'eval'] %}
{% set DASHBOARDS = ['overview'] %} {% set DASHBOARDS = ['overview'] %}
{% if grains.role == 'so-eval' %} {% if grains.role == 'so-eval' %}
{% do DASHBOARDS.append('eval') %} {% do DASHBOARDS.append('eval') %}
{% else %} {% else %}
{# Grab a unique listing of nodetypes that exists so that we create only the needed dashboards #} {# Grab a unique listing of nodetypes that exists so that we create only the needed dashboards #}
{% for dashboard in salt['cmd.shell']("ls /opt/so/saltstack/local/pillar/minions/|awk -F'_' {'print $2'}|awk -F'.' {'print $1'}").split() %} {% for dashboard in salt['cmd.shell']("ls /opt/so/saltstack/local/pillar/minions/|awk -F'_' {'print $2'}|awk -F'.' {'print $1'}").split() %}
{% if dashboard in ALLOWED_DASHBOARDS %}
{% do DASHBOARDS.append(dashboard) %} {% do DASHBOARDS.append(dashboard) %}
{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
# Grafana all the things # Grafana all the things
grafanadir: grafanadir:
file.directory: file.directory: