-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
58 lines (57 loc) · 2.06 KB
/
install.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
#!/bin/bash
echo " #################################################### Installing JDK ################################################"
echo ''
echo ''
echo ''
apt install openjdk-11-jre -y
echo ''
echo ''
echo ''
echo " #################################################### Installing logstash ################################################"
echo ''
echo ''
echo ''
cd /opt
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list
sudo apt-get update && sudo apt-get install logstash
systemctl start logstash
systemctl enable logstash
echo ''
echo ''
echo ''
echo " #################################################### Installing Loki #####################################################"
echo ''
echo ''
echo ''
wget https://github.com/grafana/loki/releases/download/v2.8.2/loki_2.8.2_amd64.deb
chmod +x loki_2.8.2_amd64.deb
dpkg -i loki_2.8.2_amd64.deb
echo ''
echo ''
echo ''
echo " #################################################### Installing Promtail ##################################################"
echo ''
echo ''
echo ''
wget https://github.com/grafana/loki/releases/download/v2.8.2/promtail_2.8.2_amd64.deb
chmod +x promtail_2.8.2_amd64.deb
dpkg -i promtail_2.8.2_amd64.deb
echo ''
echo ''
echo ''
echo " ################################################### Installing Grafana ####################################################"
echo ''
echo ''
echo ''
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
sudo wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install grafana
systemctl start grafana-server
systemctl enable grafana-server
cd /etc/logstash/conf.d/
wget https://raw.githubusercontent.com/ro6it/Loki-alb-stack/main/logstash.conf