Grafana

Document writer <olivier.nicolas@insa-lyon.fr>
v1.0, 2023-03-01

Setting up Grafana to use your prometheus data

Step 1: get to the web address

On our example, that is: 10.0.0.1:3000/login

If need be, replace:

  • 10.0.0.1 with the address of your server.

  • 3000 (the default value) with the port you associated with grafana.

step01

Step 2: signup with the default username/password

  • username = admin

  • password = admin

step02

Step 3 : go to Data sources

step03

Step 4: click on Add data source

step04

Step 5: selection your data source

For us, this will be Prometheus.

step05

Step 6: the URL field

Enter in the URL field: http://localhost:9090

it is already "filled in" but greyed out. Explicitly type the above content.
step06

Step 7: HTTP Method

Select either POST or GET, depending on what works for you.

step07

Step 8: Save and test

Click the blue field "Save & Test." If all goes well youwill see the green check with the message "Datasource updated"
on the upper right corner.

step08

Step 9: Set a dashboard up

In our case we import an already existing one but you will probably want to customize
one for you needs.

step09

Step 10: the Dashboard page

To import an existing page, we can select a pre existing one.

step10

Step 11: Getting the dashboard ID.

We choose to go to grafana’s set to get the ID of an existing dashboard.

step11

Step 12: Enter the selected ID

Enter the ID you got from grafana.com in the import field. And click Load.

step12

Step 13: Select your Prometheus Data Source.

It will be the name you chose in step 6; Default is Prometheus in the Name field. Then click Import. image::step13.png[]

Step 14: Result

Enjoy your dashboard.

Under Host/IP you can select the devices you want to monitor from what you
defined in your prometheus.yml field during the prometheus setup.

step14