TencentCloud / tencentcloud-monitor-grafana-app

Tencent Cloud Monitor App Plugin for Grafana
https://grafana.com/grafana/plugins/tencentcloud-monitor-app/
Apache License 2.0
153 stars 43 forks source link

Bug: Unable to add datasource with error: 'Found an error in: cvm: InvalidParameter;' #60

Closed kevisong closed 3 years ago

kevisong commented 3 years ago

Describe the bug When trying to add a datasource with CVM monitor on. The following error occured:

Oops! Found an error in: cvm: InvalidParameter;

To Reproduce Steps to reproduce the behavior:

  1. Go to 'datasource'
  2. Fill in secretid and secretkey
  3. Enable CVM
  4. Click save and test
  5. See error

Screenshots

image

For Bug tracing (please complete the following information):

Additional context

Complete response:

{"Response":{"Error":{"Code":"InvalidParameter","Message":"Url key and value should be splited by `=`."},"RequestId":"71d9a70d-f7f9-40bd-9918-5baa746a06d4"}}
leonlysu commented 3 years ago

@KEVISONG could you provide the RequestHeaders and RequestPayload of this error API?

kevisong commented 3 years ago

@KEVISONG could you provide the RequestHeaders and RequestPayload of this error API?

@leonlysu hi, please see below : )

Request Payload:

{"Offset":0,"Limit":1}

Request Header:

POST /api/datasources/proxy/1/cvm HTTP/1.1
Host: localhost:3000
Connection: keep-alive
Content-Length: 22
sec-ch-ua: "Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"
x-tc-version: 2017-03-12
x-grafana-org-id: 1
x-tc-region: ap-guangzhou
authorization: 
x-tc-requestclient: GF_7.5.3_PL_CM_2.0.2
content-type: application/json
accept: application/json, text/plain, */*
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
x-grafana-nocache: true
x-tc-action: DescribeInstances
x-tc-timestamp: 1619332506
Origin: http://localhost:3000
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost:3000/datasources/edit/1/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7
kevisong commented 3 years ago

Added tencentcloud-monitor-datasource to allow_loading_unsigned_plugins solved this issue.

image