Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 for "Get property value" using an alias on a disassociated stream, where the stream is of integer type #270

Closed
gregbreen opened this issue Jan 9, 2024 · 4 comments · Fixed by #275
Assignees

Comments

@gregbreen
Copy link

gregbreen commented Jan 9, 2024

What happened:

If I create a Get property value query type for a property/stream that is an integer (and the stream is disassociated), I suffer the following error:

Object
status:500
statusText:"Internal Server Error"
data:Object
message:"An error occurred within the plugin"
messageId:"plugin.downstreamError"
statusCode:500
traceID:""
config:Object
url:"api/ds/query"
method:"POST"
data:Object
requestId:"Q1326"
hideFromInspector:false
headers:Object
retry:0
message:"An error occurred within the plugin"

Pertinent points:

  1. A Get property value by asset and property works. Query by alias works if the stream is associated, but not if disassociated.
  2. Get property value history works just fine (for an integer data stream, and querying by alias on a disassociated stream).
  3. If the data stream is of type double, Get property value works fine.
  4. If I use the AWS CLI command aws iotsitewise get-asset-property-value --property-alias I can retrieve an integer value without issue.
  5. The problem is also present on plugin versions 1.15.0 and 1.12.1. Possibly this issue is some special case of Error 500 run query on SiteWise property value history for un-associated SiteWise data streams #228.

How to reproduce it (as minimally and precisely as possible):

Create a Stat panel and try to add a Get property value query for a disassociated integer data stream, and query by alias.

Environment:

  • Grafana version: 9.4
  • Plugin version: 1.16.0
  • OS Grafana is installed on: Amazon Managed Grafana
@gregbreen
Copy link
Author

Updated the description now that I test querying by asset and propoerty. That works. It only fails if I query by alias.

@kevinwcyu
Copy link
Contributor

Hi @gregbreen, Unfortunately I've been unsuccessful in reproducing this.

Some additional questions I had:

  • What is the property alias named? This is a complete shot in the dark, but that's the only thing I can think of at the moment that might be affecting this (perhaps it might be due to some handling of the alias in the data source code).
  • Is the error message you posted in the description from the network tab or from the query inspector in the query editor?

@kevinwcyu kevinwcyu moved this from Incoming to Waiting in AWS Datasources Jan 10, 2024
@gregbreen
Copy link
Author

Hi @kevinwcyu . Further experimentation shows that it's the intersection of these 4 things:

  1. Integer data stream
  2. Query by alias
  3. Get property by value
  4. Data stream is not associated (when I associate it to an asset, query by alias starts working).

Example alias/stream: ecowitt/raspberrypi4-ggv2/livedata/Indoor Humidity

Error message screenshot:

image

@gregbreen gregbreen changed the title Error 500 for "Get property value" using an alias, where the property is an integer Error 500 for "Get property value" using an alias on a disassociated stream, where the stream is of integer type Jan 11, 2024
@kevinwcyu kevinwcyu moved this from Waiting to Incoming in AWS Datasources Jan 11, 2024
@kevinwcyu kevinwcyu self-assigned this Jan 11, 2024
@kevinwcyu kevinwcyu moved this from Incoming to In Progress in AWS Datasources Jan 11, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in AWS Datasources Jan 12, 2024
@kevinwcyu
Copy link
Contributor

Hi @gregbreen, this should be available in 1.16.1 once #276 is approved for release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
2 participants