Grafana Azure Data Explorer Plug-In 中国区 ADX 支持

        目前 Azure Data Explorer Grafana Plug-In,源码只支持连接 Global 的 Endpoint。修正方法如下:

1. 下载最新的 Azure Data Explorer Grafana Plug-In

https://github.com/grafana/azure-data-explorer-datasource/releases

2. 更改 Endpoint,进入 pkg/azuredx/ 路径,修改 azuredx.go 文件 

https://github.com/grafana/azure-data-explorer-datasource/blob/master/pkg/azuredx/azuredx.go#L143

        conf := clientcredentials.Config{
                ClientID:     c.ClientID,
                ClientSecret: c.Secret,
                TokenURL:     "https://login.partner.microsoftonline.cn/" + c.TenantID + "/oauth2/v2.0/token",
                Scopes:       []string{"https://kusto.kusto.chinacloudapi.cn/.default"},
        }

3. 按照文件 CONTRIBUTING.md 文件指引进行编译,编译后替换 Grafana 安装环境内的 Plug-In

4. 删除 Grafana Plug-In 安装路径内的签名验证文件 MANIFEST.txt

5. 配置 Grafana Config File (grafana.ini),允许未授信 Plug-In 加载

[plugins]
;enable_alpha = false
;app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
allow_loading_unsigned_plugins = grafana-azure-data-explorer-datasource

 

posted @ 2021-02-09 10:37  wekang  阅读(198)  评论(0编辑  收藏  举报