When first visiting grafana, you will be provided with a sample dashboard with some basic charts setup from the database
Section | Link |
---|---|
Logging In | View Section |
Viewing All Dashboards | View Section |
Customizing a Dashboard | View Section |
Dashboard Settings | View Section |
Provisioning a Dashboard | View Section |
Troubleshooting DB Connection | View Section |
Once the app is up and running, visit http://localhost:3002
to view the Grafana dashboard.
Default login credentials are:
admin
admin
To see all dashboards created in Grafana visit /dashboards
Or, use the sidebar and click on Manage:
When viewing a dashboard, click the top bar of a panel, and go to edit
Edit Dashboard Panel Page:
Note: Data should refresh automatically, but may require a refresh using the button in some cases
Here we form the SQL query to pull data into our chart, from our database
Ensure the Data Source is the correct database
Select Format as Table, and Edit SQL buttons to write/edit queries as SQL
The Main Area is where the queries are written, and in the top right is the Query Inspector button (to inspect returned data)
In the top right of the window are buttons for:
When viewing a dashboard click on the settings icon to view dashboard settings. In here there is 2 pages important sections to use:
Variables
JSON Model
json
code here and save it to a new file in /grafana/dashboards/
with a unique name in the lake
repo. This will allow us to persist dashboards when we load the appTo save a dashboard in the lake
repo and load it:
/dashboard/new
, or use sidebar).json
file in /grafana/dashboards
To ensure we have properly connected our database to the data source in Grafana, check database settings in ./grafana/datasources/datasource.yml
, specifically:
database
user
secureJsonData/password