forked from cvamsikrishna11/devops-fully-automated
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fully automated with prometheus setup
- Loading branch information
1 parent
3b9164d
commit 9713de7
Showing
5 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
#!/bin/bash | ||
# Hardware requirements: Ubuntu 20.04 instance with mimum t2.micro type instance & port 3000 should be allowed on the security groups | ||
# Hardware requirements: Ubuntu 20.04 instance with mimum t2.micro type instance & port 3000 (grafana), 9100 (node-exporter) should be allowed on the security groups | ||
sudo apt-get install -y adduser libfontconfig1 | ||
sudo wget https://dl.grafana.com/oss/release/grafana_7.3.4_amd64.deb | ||
sudo dpkg -i grafana_7.3.4_amd64.deb | ||
sudo systemctl daemon-reload | ||
sudo systemctl start grafana-server | ||
sudo systemctl status grafana-server | ||
sudo systemctl enable grafana-server.service | ||
sudo systemctl enable grafana-server.service | ||
|
||
# node-exporter installations | ||
sudo useradd --no-create-home node_exporter | ||
|
||
wget https://github.com/prometheus/node_exporter/releases/download/v1.0.1/node_exporter-1.0.1.linux-amd64.tar.gz | ||
tar xzf node_exporter-1.0.1.linux-amd64.tar.gz | ||
sudo cp node_exporter-1.0.1.linux-amd64/node_exporter /usr/local/bin/node_exporter | ||
rm -rf node_exporter-1.0.1.linux-amd64.tar.gz node_exporter-1.0.1.linux-amd64 | ||
|
||
# setup the node-exporter dependencies | ||
sudo git clone -b installations https://github.com/cvamsikrishna11/devops-fully-automated.git /tmp/devops-fully-automated | ||
sudo cp /tmp/devops-fully-automated/prometheus-setup-dependencies/node-exporter.service /etc/systemd/system/node-exporter.service | ||
|
||
sudo systemctl daemon-reload | ||
sudo systemctl enable node-exporter | ||
sudo systemctl start node-exporter | ||
sudo systemctl status node-exporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters