配置
问:在数据源配置部分,我收到错误消息
invalid config
。这意味着什么?答:通常
invalid config
是指缺少必要的配置信息,例如 Looker URL、Looker 客户端 ID 和 Looker 客户端密钥。问:在数据源配置部分,我收到错误消息
unable to lookup Looker URL from the Grafana server
。这意味着什么?答:通常
unable to lookup Looker URL from the Grafana server
是指 Looker URL 不正确,或者 Grafana 服务器无法访问 Looker 实例。问:在数据源配置部分,我收到错误消息
unable to authenticate Looker instance. Potentially incorrect credentials provided
。这意味着什么?答:通常
unable to authenticate Looker instance. Potentially incorrect credentials provided
是指客户端 ID 或/和客户端密钥不正确。请确保您使用了正确的凭据,并且该凭据具有从 Looker 实例查询数据的正确权限。问:如何在 Grafana 实例外部验证凭据,以确保我提供了正确的凭据?
答:如果 Grafana 无法连接您的 Looker,并且您仍然认为凭据是正确的,您可以通过在运行 Grafana 服务器的主机上运行以下 curl 命令来交叉验证:
curl --location 'https://xxxxxx.looker.app/api/4.0/login' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'client_id=xxxxxx' --data-urlencode 'client_secret=xxxxxx'
。上述命令应该能够获取成功的 API 令牌。否则,您需要修正您的 API 凭据。获取令牌后,您应该可以使用以下命令:curl --location 'https://xxxxxx.looker.app/api/4.0/lookml_models' --header 'Authorization: Bearer xxxxxx'