Browse Source

filebeat

135-scirius
Steven Foerster 5 years ago
parent
commit
0c65407388
  1. 4
      scripts/services/Mistborn-scirius.service
  2. 3
      scripts/services/Mistborn-wazuh.service
  3. 17
      scripts/services/scirius/files/filebeat.docker.yml
  4. 4
      scripts/services/scirius/init.sh
  5. 4
      scripts/services/scirius/suricata_start.sh
  6. 4
      scripts/services/scirius/suricata_stop.sh

4
scripts/services/Mistborn-scirius.service

@ -15,9 +15,13 @@ ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius docker-co @@ -15,9 +15,13 @@ ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius docker-co
# Start container when unit is started
ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius docker-compose -f /opt/mistborn/extra/scirius.yml up --build
# Suricata
ExecStartPost=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius /opt/mistborn/scripts/services/scirius/suricata_start.sh
# Stop container when unit is stopped
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius docker-compose -f /opt/mistborn/extra/scirius.yml down
# Post stop
ExecStopPost=-/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius /opt/mistborn/scripts/services/scirius/suricata_stop.sh
[Install]
WantedBy=Mistborn-base.service

3
scripts/services/Mistborn-wazuh.service

@ -18,9 +18,8 @@ ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose @@ -18,9 +18,8 @@ ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose
ExecStartPost=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent.sh
ExecStartPost=-/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent_start.sh
# Stop container when unit is stopped
ExecStop=-/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent_stop.sh
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose -f /opt/mistborn/extra/wazuh.yml down
ExecStopPost=-/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent_stop.sh
[Install]
WantedBy=Mistborn-base.service

17
scripts/services/scirius/files/filebeat.docker.yml

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
filebeat.config:
modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
filebeat.autodiscover:
providers:
- type: docker
hints.enabled: true
processors:
- add_cloud_metadata: ~
output.elasticsearch:
hosts: '${ELASTICSEARCH_HOSTS:elasticsearch:9200}'
username: '${ELASTICSEARCH_USERNAME:}'
password: '${ELASTICSEARCH_PASSWORD:}'

4
scripts/services/scirius/init.sh

@ -54,3 +54,7 @@ fi @@ -54,3 +54,7 @@ fi
# sudo cp ./scripts/conf/20-suricata.conf /etc/rsyslog.d/
# sudo chown root:root /etc/rsyslog.d/20-suricata.conf
# sudo systemctl restart rsyslog
IFACE=$(ip -o -4 route show to default | awk 'NR==1{print $5}')
sudo sed -i "s/eth0/${IFACE}/g" /etc/suricata/suricata.yml
sudo sed -i "s/eth0/${IFACE}/g" /etc/default/suricata

4
scripts/services/scirius/suricata_start.sh

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
#!/bin/bash
systemctl start suricata
systemctl enable suricata

4
scripts/services/scirius/suricata_stop.sh

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
#!/bin/bash
systemctl stop suricata
systemctl disable suricata
Loading…
Cancel
Save