mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add Info to nodestab
This commit is contained in:
@@ -16,8 +16,12 @@ else
|
|||||||
if [ $TYPE == 'sensorstab' ]; then
|
if [ $TYPE == 'sensorstab' ]; then
|
||||||
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
salt-call state.apply common
|
|
||||||
fi
|
fi
|
||||||
|
if [ $TYPE == 'nodestab' ]; then
|
||||||
|
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
|
||||||
|
fi
|
||||||
|
|
||||||
|
salt-call state.apply common
|
||||||
salt-call state.apply utility
|
salt-call state.apply utility
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -261,6 +261,22 @@ dashboard-{{ SN }}:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if salt['pillar.get']('nodestab', False) %}
|
||||||
|
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).iteritems() %}
|
||||||
|
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 }}
|
||||||
|
MANINT: {{ SNDATA.manint }}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
# Install the docker. This needs to be behind nginx at some point
|
# Install the docker. This needs to be behind nginx at some point
|
||||||
so-grafana:
|
so-grafana:
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ echo "Applying cross cluster search config..."
|
|||||||
-d "{\"persistent\": {\"search\": {\"remote\": {\"{{ MASTER }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}"
|
-d "{\"persistent\": {\"search\": {\"remote\": {\"{{ MASTER }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}"
|
||||||
|
|
||||||
# Add all the storage nodes to cross cluster searching.
|
# Add all the storage nodes to cross cluster searching.
|
||||||
{%- for SN, SNIP in salt['pillar.get']('nodestab', {}).iteritems() %}}
|
#{%- for SN, SNIP in salt['pillar.get']('nodestab', {}).iteritems() %}}
|
||||||
curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SNIP['ip'] }}:9300"]}}}}}'
|
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).iteritems() %}
|
||||||
|
curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SNDATA.ip }}:9300"]}}}}}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|||||||
@@ -745,7 +745,7 @@ set_initial_firewall_policy() {
|
|||||||
if [ $INSTALLTYPE == 'STORAGENODE' ]; then
|
if [ $INSTALLTYPE == 'STORAGENODE' ]; then
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh storage_nodes $MAINIP
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh storage_nodes $MAINIP
|
||||||
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh nodestab $HOSTNAME $MAINIP
|
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh nodestab $HOSTNAME $MAINIP $MAININT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then
|
if [ $INSTALLTYPE == 'PARSINGNODE' ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user