Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Filebeat module and adapted Elasticsearch IP #144

Merged
merged 11 commits into from
Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ All notable changes to this project will be documented in this file.

- Update to Wazuh version 3.9.4_7.2.0

- Added Filebeat module and adapted Elasticsearch IP[rshad](https://github.com/rshad) [PR#144] (https://github.com/wazuh/wazuh-puppet/pull/144)

- Added Kitchen testing for Wazuh deployment with Puppet. [rshad](https://github.com/rshad) [PR#139](https://github.com/wazuh/wazuh-puppet/pull/139)

- Moved command and email_alert templates to templates/fragments. [rshad](https://github.com/rshad) [PR#143](https://github.com/wazuh/wazuh-puppet/pull/143).

- Fixed integration when group is not specified. [TheoPoc](https://github.com/TheoPoc) [PR#142](https://github.com/wazuh/wazuh-puppet/pull/142).
Expand Down
4 changes: 1 addition & 3 deletions manifests/elasticsearch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$elasticsearch_path_logs = '/var/log/elasticsearch',


$elasticsearch_ip = 'localhost',
$elasticsearch_ip = '<YOUR_ELASTICSEARCH_IP>',
$elasticsearch_port = '9200',
$elasticsearch_discovery_option = 'discovery.type: single-node',
$elasticsearch_cluster_initial_master_nodes = "#cluster.initial_master_nodes: ['es-node-01']",
Expand All @@ -27,8 +27,6 @@

){

class {'wazuh::repo_elastic':}

# install package
package { 'Installing elasticsearch...':
ensure => $elasticsearch_version,
Expand Down
22 changes: 19 additions & 3 deletions manifests/filebeat.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Wazuh App Copyright (C) 2019 Wazuh Inc. (License GPLv2)
# Setup for Filebeat
class wazuh::filebeat (
$filebeat_elasticsearch_ip = 'localhost',
$filebeat_elasticsearch_ip = '<YOUR_ELASTICSEARCH_IP>',
$filebeat_elasticsearch_port = '9200',
$elasticsearch_server_ip = "\"${filebeat_elasticsearch_ip}:${filebeat_elasticsearch_port}\"",

Expand All @@ -10,8 +10,11 @@
$filebeat_version = '7.2.0',
$wazuh_app_version = '3.9.4_7.2.0',
$wazuh_extensions_version = 'v3.9.4',
$wazuh_module_filebeat_module = 'wazuh-filebeat-0.1.tar.gz',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets change this to wazuh_filebeat_module I think it clearer

){

class {'wazuh::repo_elastic':}

package { 'Installing Filebeat...':
ensure => $filebeat_version,
name => $filebeat_package,
Expand All @@ -32,10 +35,23 @@
notify => Service['filebeat']
}

exec { 'Installing filebeat module ... Downloading package':
path => '/usr/bin',
command => "curl -o /root/${$wazuh_module_filebeat_module} https://packages-dev.wazuh.com/3.x/filebeat/${$wazuh_module_filebeat_module}",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also changing here for wazuh_filebeat_module

}

exec { 'Unpackaging ...':
command => "/bin/tar -xzvf /root/wazuh-filebeat-0.1.tar.gz -C /usr/share/filebeat/module",
notify => Service['filebeat']
}

file { '/usr/share/filebeat/module/wazuh':
ensure => 'directory',
mode => '0755',
}

service { 'filebeat':
ensure => running,
enable => true,
}


}
2 changes: 1 addition & 1 deletion manifests/kibana.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$kibana_version = '7.2.0',
$kibana_app_version = '3.9.4_7.2.0',

$kibana_elasticsearch_ip = 'localhost',
$kibana_elasticsearch_ip = '<YOUR_ELASTICSEARCH_IP>',
$kibana_elasticsearch_port = '9200',

$kibana_server_port = '5601',
Expand Down