-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
367 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Initialize the backup folder | ||
bkp_folder=/tmp/wazuh_files_backup | ||
mkdir -p $bkp_folder | ||
|
||
## Backup the host information | ||
cat /etc/*release* > $bkp_folder/host-info.txt | ||
|
||
## Install rsync | ||
yum install -y rsync | ||
|
||
## Backup the Wazuh files | ||
rsync -aREz \ | ||
--ignore-missing-args \ | ||
/etc/wazuh-indexer/certs/ \ | ||
/etc/wazuh-indexer/jvm.options \ | ||
/etc/wazuh-indexer/jvm.options.d \ | ||
/etc/wazuh-indexer/log4j2.properties \ | ||
/etc/wazuh-indexer/opensearch.yml \ | ||
/etc/wazuh-indexer/opensearch.keystore \ | ||
/etc/wazuh-indexer/opensearch-observability/ \ | ||
/etc/wazuh-indexer/opensearch-reports-scheduler/ \ | ||
/etc/wazuh-indexer/opensearch-security/ \ | ||
/usr/lib/sysctl.d/wazuh-indexer.conf $bkp_folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Initialize the backup folder | ||
bkp_folder=/tmp/wazuh_files_backup | ||
mkdir -p $bkp_folder | ||
|
||
## Backup the host information | ||
cat /etc/*release* > $bkp_folder/host-info.txt | ||
|
||
## Install rsync | ||
yum install -y rsync | ||
|
||
## Backup the Wazuh files | ||
rsync -aREz -v --stats --progress \ | ||
--ignore-missing-args \ | ||
/etc/filebeat/ \ | ||
/etc/postfix/ \ | ||
/var/ossec/api/configuration/ \ | ||
/var/ossec/etc/client.keys \ | ||
/var/ossec/etc/sslmanager* \ | ||
/var/ossec/etc/ossec.conf \ | ||
/var/ossec/etc/internal_options.conf \ | ||
/var/ossec/etc/local_internal_options.conf \ | ||
/var/ossec/etc/rules/local_rules.xml \ | ||
/var/ossec/etc/decoders/local_decoder.xml \ | ||
/var/ossec/etc/shared/ \ | ||
/var/ossec/queue/agentless/ \ | ||
/var/ossec/queue/agents-timestamp \ | ||
/var/ossec/queue/fts/ \ | ||
/var/ossec/queue/rids/ \ | ||
/var/ossec/stats/ \ | ||
/var/ossec/var/multigroups/ \ | ||
$bkp_folder | ||
|
||
## Backup the Wazuh files | ||
rsync -aREz -v --stats --progress \ | ||
/var/ossec/queue/db/ \ | ||
$bkp_folder | ||
|
||
|
||
# Merge the two for loops | ||
for i in {1..20} ; do | ||
if [ $i -lt 10 ]; then | ||
echo "Copying 012.db to 0$i.db" | ||
rsync -aREz -v --stats --progress --ignore-missing-args "/var/ossec/queue/db/00$i.db" $bkp_folder | ||
else | ||
echo "Copying 012.db to $i.db" | ||
rsync -aREz -v --stats --progress --ignore-missing-args "/var/ossec/queue/db/0$i.db" $bkp_folder | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"root-ca.pem":"-----BEGIN CERTIFICATE-----\nMIIDbTCCAlWgAwIBAgIUexcJCKPqBeep6y/4HwVwvOQOurAwDQYJKoZIhvcNAQEL\nBQAwRjELMAkGA1UEBhMCVVMxEzARBgNVBAcMCkNhbGlmb3JuaWExEDAOBgNVBAoM\nB0NvbXBhbnkxEDAOBgNVBAMMB3Jvb3QtY2EwHhcNMjQxMDAyMDkzMzU3WhcNMzQ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FVTE6KPS9EwJc+/G9D92SUGy4Mld8jTIH/9Y\ngTPDttXqpwKBgGenYZ1WGaF+xQ6JpvyGiND8mHG1oylYmLiovCNitJZ1Hnt+APk4\nZui3rX3myWMPimnTUlLRZBX4M2SCFJGA/RRZWzUftMe1yxIr3aKBAxAPrRR+6CQ/\nr82JYLjTsUK6GBTs7pEPJXAABEfCjiFS9dmEyuiXr6P/Fy+qadzd3xONAoGBAJea\nDlACAjrfVuVZP41gSqkEhEBODYkSrmNA0ImB4zN5NU7kU+8iduypXFDo8R4I8yJ4\nelajFqZ7CVuJZT6RwEYKRGG9NaxLyrVGR6teNx0YnKSOtPIVWohv7Djes0SFa0UG\n0mlfXRCIpE78+TavM+GEI4LrJNkLakxAhcC0bfObAoGAeXMvxDXyHUgElzM4aK+M\n91UaDBXcPcRg06ljJdOhh1kgJTd1O4EFSKWBF6uTluCIBeJF+azYZpMVXwdeA0hq\nRMO1Oq57Io9W3qKJ6M9dgHr+chGwKlYLucAK1yizmWXeFeN4yTQw2Akf+0ZDlO0+\nGHpWew24KuI8AWzcVF0UJwI=\n-----END PRIVATE KEY-----"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
cp etc/filebeat/filebeat.reference.yml /etc/filebeat/ | ||
cp etc/filebeat/fields.yml /etc/filebeat/ | ||
cp -r etc/filebeat/modules.d/* /etc/filebeat/modules.d/ | ||
cp -r etc/postfix/* /etc/postfix/ | ||
cp var/ossec/etc/client.keys /var/ossec/etc/ | ||
chown root:wazuh /var/ossec/etc/client.keys | ||
cp -r var/ossec/etc/sslmanager* /var/ossec/etc/ | ||
cp var/ossec/etc/ossec.conf /var/ossec/etc/ | ||
chown root:wazuh /var/ossec/etc/ossec.conf | ||
cp var/ossec/etc/internal_options.conf /var/ossec/etc/ | ||
chown root:wazuh /var/ossec/etc/internal_options.conf | ||
cp var/ossec/etc/local_internal_options.conf /var/ossec/etc/ | ||
chown root:wazuh /var/ossec/etc/local_internal_options.conf | ||
cp -r var/ossec/etc/rules/* /var/ossec/etc/rules/ | ||
chown -R wazuh:wazuh /var/ossec/etc/rules/ | ||
cp -r var/ossec/etc/decoders/* /var/ossec/etc/decoders | ||
chown -R wazuh:wazuh /var/ossec/etc/decoders/ | ||
cp -r var/ossec/etc/shared/* /var/ossec/etc/shared/ | ||
chown -R wazuh:wazuh /var/ossec/etc/shared/ | ||
chown root:wazuh /var/ossec/etc/shared/ar.conf | ||
cp -r var/ossec/logs/* /var/ossec/logs/ | ||
chown -R wazuh:wazuh /var/ossec/logs/ | ||
cp -r var/ossec/queue/agentless/* /var/ossec/queue/agentless/ | ||
chown -R wazuh:wazuh /var/ossec/queue/agentless/ | ||
cp var/ossec/queue/agents-timestamp /var/ossec/queue/ | ||
chown root:wazuh /var/ossec/queue/agents-timestamp | ||
cp -r var/ossec/queue/fts/* /var/ossec/queue/fts/ | ||
chown -R wazuh:wazuh /var/ossec/queue/fts/ | ||
cp -r var/ossec/queue/rids/* /var/ossec/queue/rids/ | ||
chown -R wazuh:wazuh /var/ossec/queue/rids/ | ||
cp -r var/ossec/stats/* /var/ossec/stats/ | ||
chown -R wazuh:wazuh /var/ossec/stats/ | ||
cp -r var/ossec/var/multigroups/* /var/ossec/var/multigroups/ | ||
chown -R wazuh:wazuh /var/ossec/var/multigroups/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{{ range $name, $val := .Values.svcs -}} | ||
{{- if $val.enabled -}} | ||
{{- with $val }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "common.tplvalues.render" (dict "value" $name "context" $) }} | ||
namespace: {{ include "common.names.namespace" $ }} | ||
labels: | ||
{{- include "common.labels.standard" ( dict "customLabels" .additionalLabels "context" $ ) | nindent 4 }} | ||
annotations: | ||
{{- include "common.annotations.standard" ( dict "customAnnotations" .annotations "context" $ ) | nindent 4 }} | ||
spec: | ||
{{ with .type }} | ||
type: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
{{ if eq .type "LoadBalancer" }} | ||
{{ with .loadBalancerClass }} | ||
loadBalancerClass: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
{{ end }} | ||
selector: | ||
{{- include "common.labels.matchLabels" $ | nindent 4 }} | ||
{{- include "common.tplvalues.render" (dict "value" .selector "context" $) | nindent 4 -}} | ||
{{ with .ports }} | ||
ports: | ||
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 4 -}} | ||
{{ end }} | ||
{{ with .loadBalancerIP }} | ||
loadBalancerIP: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{- end }} | ||
{{ with .allocateLoadBalancerNodePorts }} | ||
allocateLoadBalancerNodePorts: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{- end }} | ||
{{ with .clusterIP }} | ||
clusterIP: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
{{ with .externalTrafficPolicy }} | ||
externalTrafficPolicy: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
{{ with .sessionAffinity }} | ||
sessionAffinity: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
{{ with .externalName }} | ||
externalName: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
{{ with .healthCheckNodePort }} | ||
healthCheckNodePort: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
{{ with .publishNotReadyAddresses }} | ||
publishNotReadyAddresses: {{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{ end }} | ||
--- | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.