-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathelastic-logstash-server.sh
60 lines (51 loc) · 1.52 KB
/
elastic-logstash-server.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
###### Install Elastic and logstash ######
apt-get install default-jre -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb
dpkg -i elasticsearch-1.1.0.deb
update-rc.d elasticsearch defaults
apt-get install -f
apt-get install git rubygems -y
gem install fpm
git clone https://github.com/Yuav/logstash-packaging.git --depth=1
cd logstash-packaging
./package.sh
cd ..
dpkg -i logstash_1.*.deb
/etc/init.d/elasticsearch start
update-rc.d logstash defaults
/etc/init.d/logstash start
###### Install LAMP ######
apt-get install tasksel
tasksel install lamp-server
cd /var/wwww/
git clone https://github.com/elasticsearch/kibana.git
/usr/share/elasticsearch/bin/plugin -install royrusso/elasticsearch-HQ
echo "
input {
rabbitmq {
user => "user"
threads => "4"
password => "password"
exchange => "amq.direct"
queue => "logstash-queue"
exclusive => false
vhost => "/amp"
host => "ipaddress"
type => "logstash-indexer-input"
}
}
filter{
mutate{
rename => {"[geoip][coordinates]" => "[geoip][location]"}
}
}
output {
elasticsearch {
host => ["10.240.0.4","10.240.0.6","10.240.0.5","10.240.0.3"]
sniffing => true
cluster => "elastichoney-cluster"
node_name => "the-qtip"
workers => "4"
}
}
" > '/etc/logstash/brotastic.conf'