-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeats.sh
18 lines (17 loc) · 842 Bytes
/
beats.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
mkdir /opt/elk
wget --directory-prefix=/opt/elk https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.4.2-amd64.deb
wget --directory-prefix=/opt/elk https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.4.2-amd64.deb
echo "Making downloaded packages executable"
chmod +x /opt/elk/*
dpkg -i /opt/elk/metricbeat-6.4.2-amd64.deb
dpkg -i /opt/elk/filebeat-6.4.2-amd64.deb
cp /home/tortoise/beats_installation/metricbeat.yml /etc/metricbeat/metricbeat.yml
cp /home/tortoise/beats_installation/system.yml /etc/metricbeat/modules.d/system.yml
systemctl daemon-reload
metricbeat modules enable system
systemctl start metricbeat.service
cp /home/tortoise/beats_installation/filebeat.yml /etc/filebeat/filebeat.yml
filebeat modules enable system
systemctl start filebeat.service
systemctl enable filebeat.service