

如需與 Amazon Timestream for LiveAnalytics 類似的功能，請考慮使用 Amazon Timestream for InfluxDB。它提供簡化的資料擷取和單一位數毫秒查詢回應時間，以進行即時分析。[在這裡](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html)進一步了解。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 格拉法納
<a name="Grafana"></a>

 您可以使用 Grafana 視覺化時間序列資料並建立提醒。為了協助您開始使用資料視覺化，我們在 Grafana 中建立了範例儀表板，該儀表板可將從 Python 應用程式傳送至 Timestream 的資料視覺化，並建立說明設定的[影片教學](https://youtu.be/pilkz645cs4)課程。

**Topics**
+ [範例應用程式](#Grafana.sample-app)
+ [影片教學課程](#Grafana.video-tutorial)

## 範例應用程式
<a name="Grafana.sample-app"></a>

1.  如需[建立 資料庫](console_timestream.md#console_timestream.db.using-console)詳細資訊，請依照 中說明的指示，在 Timestream 中建立資料庫和資料表。
**注意**  
 Grafana 儀表板的預設資料庫名稱和資料表名稱分別設定為 grafanaDB 和 grafanaTable。使用這些名稱將設定降至最低。

1. 安裝 [Python 3.7 ](https://www.python.org/downloads/)或更新版本。

1.  [安裝和設定 Timestream Python SDK](getting-started.python.md)。

1.  複製[多執行緒 Python 應用程式的](https://github.com/awslabs/amazon-timestream-tools/tree/mainline/tools/python/continuous-ingestor) GitHub 儲存庫，持續依照 [GitHub](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/cloning-a-repository) 的指示將資料擷取至 Timestream。

1. 依照 [README](https://github.com/awslabs/amazon-timestream-tools/blob/mainline/tools/python/continuous-ingestor/README.md) 中的指示執行應用程式，以持續將資料擷取至 Timestream。

1. 完成 [了解如何建立和使用 Amazon Managed Grafana 資源](https://docs.aws.amazon.com/grafana/latest/userguide/getting-started-with-AMG.html)或完成[安裝 Grafana](https://grafana.com/docs/grafana/latest/installation/)。

1. 如果安裝 Grafana 而不是使用 Amazon Managed Grafana，請完成[在 Grafana 雲端上安裝 Amazon Timestream](https://grafana.com/grafana/plugins/grafana-timestream-datasource/?tab=installation/)。

1. 使用您選擇的瀏覽器開啟 Grafana 儀表板。如果您已在本機安裝 Grafana，您可以依照 Grafana 文件中所述的指示[登入](https://grafana.com/docs/grafana/latest/getting-started/getting-started/#log-in-for-the-first-time)。

1. 啟動 Grafana 後，前往資料來源，按一下新增資料來源，搜尋 Timestream，然後選取 Timestream 資料來源。

1. 設定驗證提供者和區域，然後按一下儲存並測試。

1. 設定預設巨集。

   1. 將 \$1\$1\$1database 設定為 Timestream 資料庫的名稱 （例如 grafanaDB)。

   1. 將 \$1\$1\$1table 設定為 Timestream 資料表的名稱 （例如 grafanaTable)。

   1. 將 \$1\$1\$1measure 設定為資料表中最常用的量值。

1. 按一下儲存並測試。

1. 按一下儀表板索引標籤。

1. 按一下匯入以匯入儀表板。

1. 按兩下範例應用程式儀表板。

1. 按一下儀表板設定。

1. 選取變數。

1. 變更 dbName 和 tableName，以符合 Timestream 資料庫和資料表的名稱。

1. 按一下 Save (儲存)。

1. 重新整理儀表板。

1. 若要建立提醒，請遵循 Grafana 文件中所述的指示，以[設定 Grafana 受管提醒規則](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-grafana-managed-rule/)。

1. 若要對警示進行故障診斷，請遵循 Grafana 文件中所述的說明進行[故障診斷](https://grafana.com/docs/grafana/latest/troubleshooting/)。

1. 如需詳細資訊，請參閱 [Grafana 文件](https://grafana.com/docs/)。

## 影片教學課程
<a name="Grafana.video-tutorial"></a>

本[影片](https://youtu.be/pilkz645cs4)說明 Grafana 如何與 Timestream 搭配使用。