
Deploy AWS EC2 Instance with the Grafana server Installed
Create an Instance for the GRAFANA server and Prometheus and install them
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
Update and Upgrade Packages:
sudo apt-get update
sudo apt upgrade -y
Install Prometheus using the package manager.
sudo apt-get install prometheus -y
Start and Enable Prometheus:
sudo systemctl start prometheus
sudo systemctl enable prometheus
Explore - Prometheus - Grafana
Configure Prometheus:for SNMP exporter
sudo vim /etc/prometheus/prometheus.yml
Add the job needed in the config file and add the target server, i.e., localhost
scrape_configs:
job_name: 'prometheus'
static_configs:
targets: ['localhost:9090']
Add more targets as needed
Restart the config file
sudo systemctl restart prometheus
promtool check config /etc/prometheus/prometheus.yml to check the
STATUS --> TARGETS to check the added server in prometheus
Allow the port 9090 in the security group for the Grafana server and open the Web URL https://54.161.184.249:9090
After integrating Prometheus in Grafana
RUN QUERY for “go_gc_duration_seconds”
Add the query to the dashboard
