arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Setting a Grafana Dashboard using the Athena plugin

hashtag
Visit Grafana.comarrow-up-right, click 'data sources' and then click 'Add new data source'.

hashtag
Get plugin >> Amazon Athena >> Install Plugin

hashtag
'Amazon Athena' plugin is added,

hashtag
Return to AWS IAM settings, select the 'Users tab', and click 'Create User. '

hashtag
Specify the user details and click 'Next'.

hashtag
To set permissions, select 'Attach policies directly'.

hashtag
Select from the existing policies.

hashtag
Click 'Create user'

hashtag
Create the Access Key.

hashtag
Select 'Others' and click 'Next.'

hashtag
Set Description tags if required, and click 'Create access key'.

hashtag
Once the Access key is created, copy and save both the access and the secret access key, or download them as a .csv file and click 'Done'.

hashtag
Now go back to Grafana to specify the Athena dashboard's settings and click 'Save and test.' Ensure that the output location is a folder in the S3 bucket.

hashtag
Once the data source is tested, this message is displayed.

hashtag
Click 'Dashboards', click 'New' and then click 'New dashboard'.

hashtag
Click 'Add visualization'.

hashtag
Select the data source.

hashtag
This opens the basic dashboard screen.

hashtag
Add your query and then click 'Run query'.

For example

hashtag
Editable Format

hashtag
The Dashboard is created.

SELECT
    $__timeGroup(time, $__interval) as Time,
    AVG("$__column") as Alt
FROM
    "$__table"
WHERE
    $__timeFilter(time)
GROUP BY
    $__timeGroup(time, $__interval)
ORDER BY
    Time ASC