Skip to content

Grafana ​

Preparation for Installation ​

Install Infinity ​

https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/

Configure Data Sources ​

Add a New Data Source ​

Connections -> Data sources -> Add new data source
alt text

alt text

Select Infinity ​

alt text

Configure Authentication ​

Type: API Key Value pair
Key: X-API-KEY
Value: Enter your API Key

alt text

Configure Base URL ​

Enter the corresponding URL based on your site:

Global Service Region: https://www.weincloud.net
China Service Region: https://www.weincloud.net.cn

alt text

Configure Security ​

We must allow hosts. Enter the corresponding URL based on your site:

Global Service Region: https://www.weincloud.net
China Service Region: https://www.weincloud.net.cn

alt text

Create Panel (Time Series) ​

Select Visualization ​

Choose Time series for Visualization.

alt text

Basic Configuration ​

Select JQ for Parser.

Use history data:
/dashboard/api/v2/open_api/history

alt text

Configure Body ​

Click Headers, Body, Request params.

Body Type: Raw
Body Content Type: JSON

alt text

Enter the corresponding query content based on the API documentation.

示例

json
{
  "start": "${__from:date:iso}",
  "end": "${__to:date:iso}",
  "tags": [
    {
      "hw_key": "imhwkey",
      "name": "16bit Unsigned"
    }
  ]
}

${__from:date:iso} and ${__to:date:iso} correspond to the time selector at the top of Grafana, allowing you to directly manipulate time through Grafana.

alt text

alt text

Configure Result Parsing ​

Click Parsing options & Result fields.

Enter .d.[].values in Rows/Root to retrieve the values data for each tag.

Columns need to be formatted:
hmi_time -> Time(UNIX ms)
value -> Number

alt text

Duplicate Multiple Queries ​

A single query only retrieves one tag.

Therefore, duplicate one query to retrieve the second tag.

alt text

Complete the Setup ​

You can click Save Dashboard in the upper right corner.

You can also click Refresh in advance to view the results.

alt text