Prerequisites:
- For this Demonstration Purpose i Need 3-linux Servers 1-server for Monitering remaing are to install Prometheus & Grafana Software’s in those servers.
- For installing Prometheus Software Refer This doc: https://prometheus.io/download/
- For installing Grafana Software Refer this Doc: https://grafana.com/docs/grafana/latest/setup-grafana/installation/rpm/
- For Demo Purpose I am using Cloud Technology as AWS using
Let’s Start The Process:
Installing node_exporter on linux monitering Server:
- Launch 3-Linux servers using AWS and open all traffic in Security Group for demo purpose only not recommended to open in real-time while working on projects.
Then login to Linux Server & move to /opt directory which you’re trying to moniter liken shown below.
- Next install Node Exporter in the same server by referring the Prometheus official doc: https://prometheus.io/download/
sudo wget https://github.com/prometheus/node_exporter/releases/download/v1.4.0-
rc.0/node_exporter-1.4.0-rc.0.linux-amd64.tar.gz
- Next open tar.gz file by using sudo tar xf like shown below
- Next move that long name file of node-exporter into shortcut name as a node_exporter
- Next run or execute that node_exporter on the same directory where you install Node exporter bysudo ./node_exporter
- Copy public-i.p of Linux Monitor Server & Then move to browser click on search
Prometheus Installation on another Linux Server:gThen login to Prometheus Server & move to cd /opt directory which you’re trying to
- moniter liken shown below.
sudo wget https://github.com/prometheus/prometheus/releases/download/v2.37.0/prometheus-
2.37.0.linux-amd64.tar.gz
- Next open or extract tar.gz file by using sudo tar xf like shown below
- Next After open that tar file remove that .gz file no longer need like this
- Next rename to that Prometheus Software file its too long nameNext Move to Prometheus Directory cd Prometheus & then see the list of files andit will show the directories in the directory
- Modify that Prometheus.yml file and add the host entries of Monitoring server like shownbelowNext Run that Prometheus.yml file to reflect the changes which we modified./Prometheus.ymlCopy public-I.P of the Prometheus Server & Then Move to browser and clcik on searchGrafana Installation on another Linux Server: Then login to Prometheus Server & move to cd /opt directory which you’re trying tomoniter liken shown below.
Next refer the Official Document of Grafana :
In that edit the file sudo vi /etc/yum.repos.d/grafana.repo
Then start the service using sudo systemctl start grafana-server
- Then Copy Public ip of Grafana server and access it from browser & login with default name as admin & password admin
- Next Configure data source as a Prometheus
- Next Click on Import dashboard like shown Then import and add dashboard from garafana labs avilabe predefine dashboard then finallymonitor server
- Then finally you can moniter your Linux server using Prometheus & grafana help of nodeexporter
-
- Note: Open all Traffic in Security Groups under Edit In-bound rules access from anywhere for all the 3 servers for demo purposes only
- If you need Grafana Dash Board from online searching with key word grafana-labs 0r grafana dashboards
- I used here for demo purpose predefined Grafana Dash Board 1860
No comments:
Post a Comment