mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Grafana Dashboard Test
This commit is contained in:
@@ -8,4 +8,4 @@ providers:
|
||||
disableDeletion: false
|
||||
editable: true
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards
|
||||
path: /etc/grafana/grafana_dashboards
|
||||
|
||||
2
salt/common/grafana/grafana_dashboards/sensor.json
Normal file
2
salt/common/grafana/grafana_dashboards/sensor.json
Normal file
@@ -0,0 +1,2 @@
|
||||
# The Names is {{ SERVERNAME }}
|
||||
# The INT is {{ INT }}
|
||||
@@ -229,6 +229,13 @@ grafanaconfdir:
|
||||
- group: 939
|
||||
- makedirs: True
|
||||
|
||||
grafanadashdir:
|
||||
file.directory:
|
||||
- name: /opt/so/conf/grafana/grafana_dashboards
|
||||
- user: 939
|
||||
- group: 939
|
||||
- makedirs: True
|
||||
|
||||
grafanaconf:
|
||||
file.recurse:
|
||||
- name: /opt/so/conf/grafana/etc
|
||||
@@ -237,6 +244,22 @@ grafanaconf:
|
||||
- template: jinja
|
||||
- source: salt://common/grafana/etc
|
||||
|
||||
{%- for SN, SIP in salt['pillar.get']('sensorstab', {}).iteritems() %}}
|
||||
{% include: 'sensors.{{ SN }}.sls' %}
|
||||
|
||||
dashboard-{{ SN }}:
|
||||
file.managed:
|
||||
- name: /opt/so/conf/grafana/grafana_dashboards/{{ SN }}-Sensor.json
|
||||
- user: 939
|
||||
- group: 939
|
||||
- template: jinja
|
||||
- source: salt://common/grafana/grafana_dashboards/sensor.json
|
||||
- defaults:
|
||||
- SERVERNAME: {{ SN }}
|
||||
- INT: salt['pillar.get']('sensor:mainint')
|
||||
|
||||
{% endfor %}
|
||||
|
||||
# Install the docker. This needs to be behind nginx at some point
|
||||
so-grafana:
|
||||
docker_container.running:
|
||||
@@ -247,6 +270,7 @@ so-grafana:
|
||||
- /nsm/grafana:/var/lib/grafana:rw
|
||||
- /opt/so/conf/grafana/etc/datasources:/etc/grafana/provisioning/datasources:rw
|
||||
- /opt/so/conf/grafana/etc/dashboards:/etc/grafana/provisioning/dashboards:rw
|
||||
- /opt/so/conf/grafana/grafana_dashboards:/etc/grafana/grafana_dashboards:rw
|
||||
- environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=augusta
|
||||
- port_bindings:
|
||||
|
||||
Reference in New Issue
Block a user