From 3cd4a412f1cfd3e58953549f4e8a272c518aa500 Mon Sep 17 00:00:00 2001 From: Bhaskar Karambelar Date: Wed, 15 Jul 2015 12:37:39 -0400 Subject: [PATCH] Removed logstash verbose flag and also fixed #3 & fixed #2 --- .gitignore | 1 + Vagrantfile | 1 + lib/elasticsearch-module.rb | 6 +++--- scripts/logstash-start | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 60c2f00..acdc4db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .vagrant/ conf/*.yml +conf/*.conf logs/ data/ *.rpm diff --git a/Vagrantfile b/Vagrantfile index 352ada9..d347c42 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -19,6 +19,7 @@ Vagrant.configure("2") do |config| cluster_ram = cluster_ram.to_i cluster_cpu = utils.get_cluster_info 'cluster_cpu' + cluster_cpu = cluster_cpu.to_i config.vm.box = 'chef/centos-7.1' diff --git a/lib/elasticsearch-module.rb b/lib/elasticsearch-module.rb index 5566b2c..03d7b9b 100644 --- a/lib/elasticsearch-module.rb +++ b/lib/elasticsearch-module.rb @@ -31,7 +31,7 @@ def get_vm_name(index) def get_vm_ip(index) ip = get_cluster_info 'cluster_ip' - ip % (10 + index) + ip.strip % (10 + index) end def get_node_name(index) @@ -44,7 +44,7 @@ def get_kibana_vm_name def get_kibana_vm_ip ip = get_cluster_info 'cluster_ip' - ip % 250 + ip.strip % 250 end def get_kibana_node_name @@ -57,7 +57,7 @@ def get_logstash_vm_name def get_logstash_vm_ip ip = get_cluster_info 'cluster_ip' - ip % 251 + ip.strip % 251 end def get_logstash_node_name diff --git a/scripts/logstash-start b/scripts/logstash-start index 7c6668c..c2849dd 100755 --- a/scripts/logstash-start +++ b/scripts/logstash-start @@ -8,7 +8,7 @@ then else mkdir -p /vagrant/logs - screen -S logstash -d -m bash -l -c "logstash --verbose -f /vagrant/conf/logstash-${VM_NAME}.conf > /vagrant/logs/logstash-${VM_NAME}.log 2>&1" + screen -S logstash -d -m bash -l -c "logstash -f /vagrant/conf/logstash-${VM_NAME}.conf > /vagrant/logs/logstash-${VM_NAME}.log 2>&1" echo "-----------------------------------------------------------------------------------------------------------" echo " => Started $VM_NAME - $VM_NODE_NAME - $VM_NODE_IP: $(screen -li | grep logstash | sed 's/\s/ /g')" echo "-----------------------------------------------------------------------------------------------------------"