Grafana

In my foray into becoming more active on StackOverflow I came across a question from 7 years ago asking how to use Grafana with Amazon Cognito. I’m sure they either figured something out or no longer need an answer but I gave a stab at answering it anyways. This post will be a step-by-step guide on setting up authentication for self-hosted Grafana through Amazon Cognito using the generic OAuth method. I assume a Cognito user pool is already created and a Grafana instance sits behind a domain with TLS.1 The first section will go over creating an app client in Cognito, then configuring Grafana with the values you got from Cognito, and in the last section I will cover some errors and provide troubelshooting tips. Read more...

Grafana has the ability to use Amazon Athena as a data source allowing you to run SQL queries to visualize data. The Athena table data types are conveniently inherited in Grafana to be used in dashboard panels. If the data types in Athena are not exactly how you’d like them in Grafana you can still apply conversion functions. In this case the timestamp column in Athena is formatted as a string, and I do not have the ability to adjust the table in Athena (which is normally what you’d want to do). If your Athena table doesn’t have a column in a DATE, TIMESTAMP or TIME format you will not be able to natively use a panel that relies on a timestamp. You can parse the timestamp string using the parse_datetime() function that expects the string, and the format the string is in. This columns will now appear as a timestamp to Grafana. Read more...