Setup
- Install grafana using Script 
#!/bin/bash
echo 'deb https://packages.grafana.com/oss/deb stable main' >> /etc/apt/sources.list
curl https://packages.grafana.com/gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install grafana
systemctl daemon-reload
systemctl start grafana-server
systemctl enable grafana-server.servicechmod +x grafana.sh
sudo ./grafana.shSetting up Grafana For Prometheus
Install Grafana on instance which queries our Prometheus server.
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.4_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_5.0.4_amd64.debThen, Enable the automatic start of Grafana by systemd:
sudo systemctl daemon-reload && sudo systemctl enable grafana-server && sudo systemctl start grafana-server.serviceGrafana is running now, and we can connect to it at http://your.server.ip:3000. The default user and password is admin / admin.
Now you have to create a Prometheus data source:
- Click on the Grafana logo to open the sidebar. 
- Click on “Data Sources” in the sidebar. 
- Choose “Add New”. 
- Select “Prometheus” as the data source. 
- Set the Prometheus server URL (in our case: http://localhost:9090/). 
- Click “Add” to test the connection and to save the new data source. 
Settings should look like this:
Create your first dashboard from the information collected by Prometheus. You can also import some dashboards from a collection of shared dashboards
Last updated